This release makes binary-only changes. Once installed, any existing use of pg_clickhouse v0.1 will get its benefits on reload without needing to ALTER EXTENSION UPDATE.
⚡ Improvements
- Added mapping for the
JSONandJSONB-> TEXTand->> TEXToperators to be passed down to ClickHouse using its sub-column syntax. Thanks Kaushik Iska for the PR (#169). - Added pushdown support for
jsonb_extract_path_text()andjsonb_extract_path()to ClickHouse sub-column syntax. Thanks Kaushik Iska for the PR (#176). - Added mapping to push down
now()to now64 rather than [now], as previously, because PostgreSQL'snow()produces sub-second precision, so should its clickHouse equivalent. - Added mappings to push down the Postgres
statement_timestamp(),transaction_timestamp(), andclock_timestamp()functions to to nowInBlock64 (requires ClickHouse 25.8 or higher). - Pushdown window functions (
ROW_NUMBER,RANK,DENSE_RANK,LEAD,LAG,FIRST_VALUE,LAST_VALUE,NTH_VALUE,NTILE,CUME_DIST,PERCENT_RANK,MIN/MAX OVER) to ClickHouse instead of computing them locally. Thanks Kaushik Iska for the PR (#175). - Pushdown
bool_and/everyasgroupBitAnd,bool_orasgroupBitOr, andstring_aggasgroupConcatto ClickHouse. Thanks Philip Dubé for the PR (#184). - Added mapping sot push down the Postgres "SQL Value Functions", including
CURRENT_TIMESTAMP,CURRENT_USER, andCURRENT_DATABASE. - Changed the behavior of
CURRENT_DATABASE()to push down the name of the current Postgres database rather than to the ClickHousecurrent_database()function. - Added result set streaming to the HTTP driver. The new
fetch_sizeserver and table option specifies the size of each batch to stream and defaults to50000000, about 50MB. Set it to0to disable streaming altogether. A testing loading a 1GB table reduced memory consumption from over 1GB to 73MB peak. Thanks Kaushik Iska for the testing and PR (#181).
🐛 Bug Fixes
- Improved memory management, fixing potential crashes in out of memory situations. Thanks to Philip Dubé for the PRs (#173, #173).
- Fixed issue where the
-Mergesuffix was not consistently appended to aggregates onAggregateFunctioncolumns. Thanks to Philip Dubé for the PR (#179). - Fixed
NTILE,CUME_DIST, andPERCENT_RANKpushdown failing because the FDW emitted aROWS UNBOUNDED PRECEDINGframe clause that ClickHouse rejects for ranking functions. Thanks Philip Dubé for the PR (#184). regr_avgx,regr_avgy,regr_count,regr_intercept,regr_r2,regr_slope,regr_sxx,regr_sxy,regr_syy,json_agg_strict, andjsonb_agg_strictnow evaluate locally instead of being pushed to ClickHouse where they would fail. Thanks Philip Dubé for the PR (#184).∑
📔 Notes
- Eliminated use of a constant that required libcurl 7.87.0, restoring support for earlier versions.
- Introduced clang-tidy and integrated it into
make lintand for use in CI. Thanks to Philip Dubé for the PR (#177).
🆚 For more detail compare changes since v0.1.6.