client-v2 0.10.0: getTableSchema fails on ClickHouse 26.8 with "Failed to parse column `null` defined by type 'null'" (works on 26.7)
まだ誰も着手していません。
評価
調査の方向性
Client.getTableSchema と2列の例を使用して、ClickHouse 26.7 と 26.8 に対して失敗を再現します。Client.getTableSchemaImpl と internal/TableSchemaParser.java を読み、その後 readTSKV に到達するクライアントのリクエストとレスポンスを調査します。26.8 で両方のスキーマメソッドが null-column エラーなしにテーブルの列を返せば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Client.getTableSchema(...) and Client.getTableSchemaFromQuery(...) fail against ClickHouse 26.8 with Failed to parse column \null` defined by type 'null'`. The same code against 26.7 works. It reproduces on a two-column table, so it is not schema-specific.
The server appears to be fine: a raw DESCRIBE TABLE issued through the same client on the same connection returns every row correctly, and the server's DESCRIBE ... FORMAT TSKV bytes are identical between 26.7 and 26.8.
Steps to reproduce
try (Client client = new Client.Builder()
.addEndpoint(endpoint)
.setUsername("u").setPassword("p").setDefaultDatabase("d")
.compressClientRequest(false).compressServerResponse(true)
.build()) {
client.execute("CREATE TABLE tiny (a UInt8, b String) ENGINE=MergeTree ORDER BY a").get();
client.getTableSchema("tiny"); // OK on 26.7, throws on 26.8
}
Result:
26.7 tiny OK, columns=2
26.8 tiny FAILED ClientException: Failed to get table schema
root IllegalArgumentException: Non-null columnName and columnType are required
Expected behaviour
getTableSchema returns the table's columns, as it does on 26.7.
Error log
com.clickhouse.client.api.ClientException: Failed to get table schema
at com.clickhouse.client.api.Client.getTableSchemaImpl(Client.java:2044)
at com.clickhouse.client.api.Client.getTableSchema(Client.java:2011)
Caused by: com.clickhouse.client.api.ClientException: Failed to parse column `null` defined by type 'null'
at com.clickhouse.client.api.internal.TableSchemaParser.readTSKV(TableSchemaParser.java:33)
at com.clickhouse.client.api.Client.getTableSchemaImpl(Client.java:2036)
Caused by: java.lang.IllegalArgumentException: Non-null columnName and columnType are required
at com.clickhouse.data.ClickHouseColumn.of(ClickHouseColumn.java:676)
Configuration
- client-v2: 0.10.0
- Server:
clickhouse/clickhouse-server:26.8(fails) vs:26.7(works), official images, default configuration apart fromCLICKHOUSE_DB/USER/PASSWORD - JDK: 25
- OS: Linux container / macOS host
What I ruled out
Each of these was compared 26.7 against 26.8 directly:
- The
DESCRIBEresponse format.DESCRIBE TABLE t FORMAT TSKVover HTTP is byte-identical on both versions, on a trivial table and on a 56-column one withEnum8,Nullable,IPv6,LowCardinalityandDateTime64. Every line carries a well-formedname=…\ttype=…. - Response compression. The LZ4 bodies are identical byte-for-byte, and the failure also occurs with
compressServerResponse(false). describe_include_subcolumns. Identical output on both.default_formatoverriding the inlineFORMATclause. Sendingdefault_format=RowBinaryWithNamesAndTypesalongside... FORMAT TSKVstill returns TSKV on both versions.- Whether the server or connection is unhealthy. A raw
DESCRIBE TABLE tthrough the same client, on the same connection, immediately before the failing call, returns all rows with correct names and types.
Given readTSKV parses each line with java.util.Properties and requires name and type keys, it looks like the response reaching the parser on 26.8 is not the TSKV the server produces for an equivalent request — but I was not able to identify what the client sends differently, and I did not capture the client's own request/response bytes.
I am happy to run further probes against either version if that would help narrow it.
- 主要言語
- Java
- スター
- 1.6k
- フォーク
- 637
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ClickHouse/clickhouse-java のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ClickHouse/clickhouse-java#3143 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
ClickHouse/clickhouse-java#3111 ·
-
area:data-type bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ClickHouse/clickhouse-java#3098 · コメント 1 件 ·
-
bug client-api-v2 test
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
ClickHouse/clickhouse-java#3076 ·
-
area:sql-parser bug client-v1
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
ClickHouse/clickhouse-java#3066 ·
ClickHouse/clickhouse-java の issue をすべて見る
似ている issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
1.0.0-alpha2 Type/Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
wso2/dpdp-accelerator#272 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
infinispan/infinispan#18150 ·
-
area/frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100