clickhouse-java
clickhouse-java copied to clipboard
[jdbc-v2] DatabaseMetadata fails if server has a new type
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, it seems to have been revered https://github.com/ClickHouse/ClickHouse/pull/75735, but agree the client shouldn't fail on a new type
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.