Repository navigation
Testcontainers: Add ClickHouse JDBC test - #97
Merged
Merged
Conversation
# Conflicts: # server/build.gradle # Conflicts: # server/Makefile
ostinru
marked this pull request as ready for review
April 9, 2026 03:55
…asspath. Developers should fix dependecy issue manually
MisterRaindrop
approved these changes
Apr 9, 2026
Closed
ostinru
added a commit
to open-gpdb/cloudberry-pxf
that referenced
this pull request
Aug 26, 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 have tested following clickhouse-jdbc drivers: * 0.6.x (`jdbc-v1`) - works well with old ClickHouse versions. In ClickHouse 25.10 `jdbc-v1` got broken 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`. (cherry picked from commit 4fdba99)
ostinru
added a commit
to open-gpdb/cloudberry-pxf
that referenced
this pull request
Aug 26, 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 have tested following clickhouse-jdbc drivers: * 0.6.x (`jdbc-v1`) - works well with old ClickHouse versions. In ClickHouse 25.10 `jdbc-v1` got broken 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`. (cherry picked from commit 4fdba99)
tuhaihe
pushed a commit
that referenced
this pull request
Sep 2, 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 have tested following clickhouse-jdbc drivers: * 0.6.x (`jdbc-v1`) - works well with old ClickHouse versions. In ClickHouse 25.10 `jdbc-v1` got broken 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`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
jdbc-v1) - works well with old ClickHouse versions. In ClickHouse 25.10jdbc-v1got broken Version 25.10 breaks JBDC driver ClickHouse/clickhouse-java#2636 and all queries raised an "Magic is not correct" error message.ERROR: PXF server error : Method: getBytes("bin") encountered an exception.Add jdbc-pxf-drivers project
Add new
jdbc-pxf-driversproject 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
TextRecordReaderparses the CSV stream via univocity CSV parser => forBYTEAcolumns it callspgUtilities.parseByteaLiteral()=> which returns aByteBuffer.