diff --git a/CHANGELOG.md b/CHANGELOG.md index ab860a7..42ef58d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Enabled the crate's `spatial` feature, so `DRAW spatial` map layers now render through the Vega-Lite writer instead of raising "Spatial visualization requires the 'spatial' feature to be enabled". Spatial layers require DuckDB's `spatial` extension at runtime: ggsql issues `LOAD spatial` automatically but never `INSTALL` it, so run `INSTALL spatial` once per machine (e.g. via `DuckDBReader.execute_sql()`; the download is cached under `~/.duckdb/extensions`). Works with WKB geometry columns and the built-in `ggsql:world` dataset, including named map projections such as `PROJECT TO equal_earth`. +### Removed + +- Removed `Spec.layer_sql()` and `Spec.stat_sql()`. These mirrored a vestigial Rust API that returned `None` in every released crate since v0.1.6 (the backing fields were never populated after the scale-syntax rewrite) and was removed upstream in ggsql PR #569. No functionality is lost. + ### Changed - Data now crosses the Python↔Rust boundary via the zero-copy Arrow C Data Interface instead of Arrow IPC serialization, reducing memory copies and peak RSS for large results (on a 1M-row × 50-col register+read microbenchmark: ~5.7× faster, ~1 GB lower peak RSS). Set `GGSQL_ARROW_IPC=1` to restore the previous IPC behavior. The minimum pyarrow version is now 15. diff --git a/src/lib.rs b/src/lib.rs index e1a4bc9..e559fe7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1228,36 +1228,6 @@ impl PySpec { .transpose() } - /// Layer filter/source query, or None if using global data. - /// - /// Parameters - /// ---------- - /// index : int - /// The layer index (0-based). - /// - /// Returns - /// ------- - /// str | None - /// The filter SQL query, or None if the layer uses global data directly. - fn layer_sql(&self, index: usize) -> Option { - self.inner.layer_sql(index).map(|s| s.to_string()) - } - - /// Stat transform query, or None if no stat transform. - /// - /// Parameters - /// ---------- - /// index : int - /// The layer index (0-based). - /// - /// Returns - /// ------- - /// str | None - /// The stat transform SQL query, or None if no stat transform. - fn stat_sql(&self, index: usize) -> Option { - self.inner.stat_sql(index).map(|s| s.to_string()) - } - /// Validation warnings from preparation. /// /// Returns diff --git a/tests/test_ggsql.py b/tests/test_ggsql.py index 3d47051..9cb8f22 100644 --- a/tests/test_ggsql.py +++ b/tests/test_ggsql.py @@ -543,8 +543,6 @@ def test_can_introspect_spec(self): # Layer-specific accessors (may return None) _ = spec.layer_data(0) _ = spec.stat_data(0) - _ = spec.layer_sql(0) - _ = spec.stat_sql(0) class TestCustomReader: