Repository navigation
v4.5.0
chdb 4.5.0
Requires chdb-core>=26.11.1 (ClickHouse 26.11).
New
Polars in and out (#805): query a Polars DataFrame, LazyFrame or Series in place, and get a Polars DataFrame back.
import chdb
import polars as pl
df = pl.DataFrame({"a": [1, 2, 3]})
result = chdb.query("SELECT sum(a) AS total FROM Python(df)", "polars")
print(result["total"].item()) # 6The result is read from Arrow without pyarrow. It needs polars>=1.10.
chdbcommand (#636):pipx install chdbanduvx chdb "SELECT 1"now work.- Python UDAFs from the wrapper (#645):
chdb.agg,create_aggregate_functionanddrop_aggregate_functionare available withchdbinstalled, along withUDFType(#805).
Changed
chdb.ChdbErroris chdb-core's class (#805). It now subclassesRuntimeError, andexcept chdb.ChdbErrorcatches errors raised inside the engine bindings too.- clickhouse-connect backend removed (#648). clickhouse-connect 1.6.0 and later ships its own chDB backend.
chdb.cc_extension, theclickhouse-connectextra and its entry point are gone. - Durable namespace URLs that carry credentials are refused (#746).
Fixed
- Aborts at exit when a chDB connection was left open (#775).
import chdbno longer changes the working directory (#732).- DataStore: a large set of pandas-compatibility fixes, and more operations stay lazy:
- groupby: aggregations (#749, #776), categorical keys (#787),
skipna=False(#788),as_index=Falselabels (#786),agg()returning a Series (#789), file-ordercumsum/cummax/cummin(#784) - joins: merge, join and union (#727, #751, #780, #781, #782, #783, #796)
- selection and assignment:
iloc[]andloc[:, cols]stay lazy (#777, #793),select()with swapped aliases (#792), duplicated columns (#728), lazy callableassign()(#730), small-int and float32 dtypes (#790) - filtering and dedup:
where()/mask()after a filter (#791),drop_duplicates(subset="col")(#779) - sort: tie order in chained
sort_values()beforehead()(#785) - SQL write-back: multi-stage pipelines (#726), aggregation aliases (#729),
to_sql(execution_format=True)(#666) - CSV/TSV: exponent-notation floats read as float64 (#794)
- other:
from_arrow()(#639),describe()on non-numeric frames (#747),isocalendar().yeardtype (#664)
- groupby: aggregations (#749, #776), categorical keys (#787),
Full Changelog: v4.4.0...v4.5.0