Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
30 changes: 0 additions & 30 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> {
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<String> {
self.inner.stat_sql(index).map(|s| s.to_string())
}

/// Validation warnings from preparation.
///
/// Returns
Expand Down
2 changes: 0 additions & 2 deletions tests/test_ggsql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading