Skip to content

Testcontainers: Add ClickHouse JDBC test#97

Draft
ostinru wants to merge 11 commits intoapache:mainfrom
ostinru:clickhouse-jdbc-tests
Draft

Testcontainers: Add ClickHouse JDBC test#97
ostinru wants to merge 11 commits intoapache:mainfrom
ostinru:clickhouse-jdbc-tests

Conversation

@ostinru
Copy link
Copy Markdown
Collaborator

@ostinru ostinru commented Apr 8, 2026

Add ClickHouse JDBC tests

Add new tests to cover Cloudberry -> PXF -> JDBC path. In this test we are verifying that main data Cloudberry and ClickHouse types can be converted back and forth.

Test covers ClickHouse 24.x and 26.x versions. Open-source ClickHouse has short support lifetime.

I tested following clickhouse-jdbc drivers:

  • 0.6.x (jdbc-v1) - works well with old ClickHouse versions. In ClickHouse 25.10 jdbc-v1 got broken Version 25.10 breaks JBDC driver ClickHouse/clickhouse-java#2636 and all queries raised an "Magic is not correct" error message.
  • 0.9.4 - fixes "Magic" issues, however has issue with String <-> bytea conversion ERROR: PXF server error : Method: getBytes("bin") encountered an exception.
  • 0.9.7+ - works well

Add jdbc-pxf-drivers project

Add new jdbc-pxf-drivers project to server. It excluded from default DEB-package build. Explicit actions required to install jdbc-drivers.

Side quest

Cloudberry FDW serializes rows as Greenplum CSV => PXF TextRecordReader parses the CSV stream via univocity CSV parser => for BYTEA columns it calls pgUtilities.parseByteaLiteral() => which returns a ByteBuffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant