Skip to content

[jdbc-v2] Potentially wrong encoding for java.sql.Date #2381

Description

@Onajk

Description

I have faced some type conversion problems during serializing java.sql.Date in jdbc-v2.
jdbc V2 converts java.sql.Date to java.time.Instant and serialise it using CH fromUnixTimestamp64Nano function which returns DateTime64 type but I was expecting Date.

Date is mapped into Instant but in if-else you could see branch for Date, isn't there a mistake?
https://github.com/ClickHouse/clickhouse-java/blob/main/jdbc-v2/src/main/java/com/clickhouse/jdbc/PreparedStatementImpl.java#L427

https://github.com/ClickHouse/clickhouse-java/blob/main/jdbc-v2/src/main/java/com/clickhouse/jdbc/PreparedStatementImpl.java#L746

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions