You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add query_arrow/pandas/polars/pylist helpers on Client
Adds one-shot output ergonomics so callers don't have to reach for
.read_all().to_pandas() on the underlying Flight or ADBC reader. Each
helper accepts an optional `params` list that routes through the existing
ADBC parameterized path, otherwise it goes through Flight as before.
polars is gated behind an optional extra (`spicepy[polars]`) and raises
a clear ImportError if missing.
* style: apply black formatting to _client.py
* feat: add DataFrame API, expression DSL, functions module, and catalog helpers
Adds a credible subset of the datafusion-python surface on top of the
existing Flight + ADBC client.
Tier 1 (Client method additions):
- catalog introspection: catalogs(), schemas(), tables(), describe(),
get_schema()
- explain(sql, analyze=, verbose=) wrapping EXPLAIN
- streaming/output: query_pydict(), query_batches() iterator, show()
- writers: write_parquet(), write_csv(), write_json() streaming Flight
output to local files
- DataFrame entry points: table(), sql(), from_arrow(), from_pandas(),
from_pydict()
Tier 2 (new modules):
- spicepy._sql: identifier and literal escape helpers
- spicepy._expr: Expr DSL with arithmetic/comparison/logical operator
overloads, alias, cast, is_null, in_, between, asc/desc, CASE WHEN,
window OVER(); col(), lit(), case() public builders
- spicepy.functions: aggregates (sum/avg/min/max/count/count_distinct/
stddev/variance/median/...), math (abs/round/ceil/floor/sqrt/power/
ln/log/exp), strings (lower/upper/length/trim/concat/substr/replace/
regexp_match/starts_with/ends_with), date/time (now/current_date/
date_trunc/date_part/extract), null/control flow (coalesce/nullif/
ifnull/case), window-only (row_number/rank/dense_rank/percent_rank/
cume_dist/lag/lead/first_value/last_value/nth_value)
- spicepy._dataframe.SpiceDataFrame: lazy SQL-compiling builder with
select/with_column(s)/drop/rename/cast, filter/where/limit/head/
offset, sort/order_by/distinct, union/intersect/except_,
join (inner/left/right/full/semi/anti/cross) with key list or Expr,
group_by().aggregate(), aggregate() (global), schema/explain,
collect/to_arrow/to_pandas/to_polars/to_pylist/to_pydict/count/show
- inline VALUES path for small client-side data via from_arrow/
from_pandas/from_pydict
239 new tests (test_sql, test_expr, test_functions, test_dataframe,
extensions to test_client).
* chore(bandit): skip B608 — escaped SQL composition is the SDK's job
* docs(expr): explain why subclasses must not override __eq__
Adds a note to Expr's docstring documenting that the comparison operators
build SQL expression trees (DSL pattern, same as SQLAlchemy, pandas,
polars, Ibis, datafusion-python) and that subclass __eq__ overrides
would silently break filtering/joins. Addresses a wave of code-quality
bot reviews that misapply a value-semantics __eq__ rule to a DSL.
* chore(deps): fold dependency updates into feature PR
* feat: add GITHUB_TOKEN environment variable for Spice installation in WSL on Windows
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments