clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

[jdbc-v2] DatabaseMetadata fails if server has a new type

Open chernser opened this issue 7 months ago • 2 comments

Description

Stacktrace:

java.lang.IllegalArgumentException: Unknown data type: Time64
	at com.clickhouse.data.ClickHouseDataType.of(ClickHouseDataType.java:460)
	at com.clickhouse.jdbc.metadata.DatabaseMetaDataTest.testGetTypeInfo(DatabaseMetaDataTest.java:234)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

This means that old client would not work with a new server even if type is never used.

Expected Behaviour

Warning but no exception when client reads a new type from a server.

chernser avatar May 28 '25 05:05 chernser

@chernser, it seems to have been revered https://github.com/ClickHouse/ClickHouse/pull/75735, but agree the client shouldn't fail on a new type

mshustov avatar May 28 '25 07:05 mshustov

This exception happens actually in the test so its fine. And indicates missing type. However we may need to find place where it can cause an error.

chernser avatar Jun 27 '25 04:06 chernser