镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Testcontainers: Add ClickHouse JDBC test - #97

Merged
ostinru merged 13 commits into
apache:mainfrom
ostinru:clickhouse-jdbc-tests
Apr 9, 2026
Merged

ostinru merged 13 commits into
apache:mainfrom
ostinru:clickhouse-jdbc-tests

Conversation

@ostinru

@ostinru ostinru commented Apr 8, 2026 •

Copy link
Copy Markdown
Collaborator

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.

@ostinru
ostinru marked this pull request as ready for review April 9, 2026 03:55
@ostinru
ostinru requested a review from MisterRaindrop April 9, 2026 03:56
Comment thread server/Makefile Resolved
Comment thread server/build.gradle Resolved
Comment thread server/pxf-jdbc-drivers/build.gradle Resolved
Comment thread server/build.gradle Resolved
@ostinru
ostinru requested a review from MisterRaindrop April 9, 2026 10:23
@ostinru
ostinru merged commit 4fdba99 into apache:main Apr 9, 2026
98 of 111 checks passed
@ostinru ostinru mentioned this pull request Apr 15, 2026
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`.
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.

2 participants