Open jackj-ohn1 opened 3 months ago
连接ClickHouse集群上的某个节点后,执行基本的查询操作报错。
commit:279b6ac6dc
Flink-Table-Api (SQL)
No response
Caused by: java.lang.NullPointerException at org.apache.flink.connector.clickhouse.util.ClickHouseJdbcUtil.getDistributedEngineFull(ClickHouseJdbcUtil.java:70) at org.apache.flink.connector.clickhouse.internal.AbstractClickHouseInputFormat$Builder.build(AbstractClickHouseInputFormat.java:208) 进入查看后发现是: String engineFull = rs.getString("engine_full").replaceAll("'|\\s", ""); Matcher matcher = DISTRIBUTED_TABLE_ENGINE_PATTERN.matcher(engineFull); String cluster; if (matcher.find()) { cluster = matcher.group("cluster"); String database = matcher.group("database"); String table = matcher.group("table"); String shardingKey = matcher.group("shardingKey"); DistributedEngineFull var13 = DistributedEngineFull.of(cluster, database, table, ClickHouseUtil.parseShardingKey(shardingKey), (String)null); return var13; } cluster = null; return cluster;这里的cluster被赋值为null,但手动执行查询语句获得的结果是没有问题的SELECT engine_full FROM system.tables WHERE database = ? AND name = ?
试一下用最新的master分支跑一遍? 如果还是不行,发一下SELECT engine_full FROM system.tables WHERE database = ? AND name = ?的输出结果
SELECT engine_full FROM system.tables WHERE database = ? AND name = ?
@jackj-ohn1
报错说是第70行空指针,看下是不是url配置的问题,connection为空导致的,代码截图:
cc @qingfei1994
What happened?
连接ClickHouse集群上的某个节点后,执行基本的查询操作报错。
Affects Versions
commit:279b6ac6dc
What are you seeing the problem on?
Flink-Table-Api (SQL)
How to reproduce
No response
Relevant log output
Anything else
No response
Are you willing to submit a PR?
Code of Conduct