You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was running E2E test case reading a date column from clickhouse container, ClassCastException was thrown.
[docker-java-stream-107643741] INFO org.apache.flink.connector.clickhouse.FlinkContainerTestEnviroment - STDOUT: at org.apache.flink.connector.clickhouse.internal.converter.ClickHouseRowConverter.lambda$createToInternalConverter$f8d94b9$6(ClickHouseRowConverter.java:130)
[docker-java-stream-107643741] INFO org.apache.flink.connector.clickhouse.FlinkContainerTestEnviroment - STDOUT: at org.apache.flink.connector.clickhouse.internal.converter.ClickHouseRowConverter.toInternal(ClickHouseRowConverter.java:83)
[docker-java-stream-107643741] INFO org.apache.flink.connector.clickhouse.FlinkContainerTestEnviroment - STDOUT: at org.apache.flink.connector.clickhouse.internal.ClickHouseBatchInputFormat.nextRecord(ClickHouseBatchInputFormat.java:135)
Affects Versions
master
What are you seeing the problem on?
No response
How to reproduce
running E2E case(ClickhouseE2ECase.java) with date column.
What happened?
When I was running E2E test case reading a date column from clickhouse container, ClassCastException was thrown.
Affects Versions
master
What are you seeing the problem on?
No response
How to reproduce
running E2E case(ClickhouseE2ECase.java) with date column.
Relevant log output
No response
Anything else
I've figured out how to fix it.
In ClickHouseRowConverter.java
case DATE: return val -> (int) ((Date) val).toLocalDate().toEpochDay();
changed into
case DATE: return val -> (int) ((LocalDate)val).toEpochDay();
As val is already LocalDate type, no need to cast it to java.sql.Date.
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: