Skip to content

v4.5.0

Choose a tag to compare

@auxten auxten released this 17 Nov 23:34
33d9037

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())  # 6

The result is read from Arrow without pyarrow. It needs polars>=1.10.

  • chdb command (#636): pipx install chdb and uvx chdb "SELECT 1" now work.
  • Python UDAFs from the wrapper (#645): chdb.agg, create_aggregate_function and drop_aggregate_function are available with chdb installed, along with UDFType (#805).

Changed

  • chdb.ChdbError is chdb-core's class (#805). It now subclasses RuntimeError, and except chdb.ChdbError catches 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, the clickhouse-connect extra 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 chdb no 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=False labels (#786), agg() returning a Series (#789), file-order cumsum/cummax/cummin (#784)
    • joins: merge, join and union (#727, #751, #780, #781, #782, #783, #796)
    • selection and assignment: iloc[] and loc[:, cols] stay lazy (#777, #793), select() with swapped aliases (#792), duplicated columns (#728), lazy callable assign() (#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() before head() (#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().year dtype (#664)

Full Changelog: v4.4.0...v4.5.0