Skip to content

DateTime64 as ClickHouseDataType #517

Closed

Description

@trolley813

Not long ago, CH introduced new DateTime64 type. Despite this, it's not mentioned in ClickHouseDataType.java, so the corresponding java.sql.Types instance returned for DateTime64 is a very generic OTHER.

It probably should return a more suitable type (e.g. TIMESTAMP or even BIGINT, since technically it's a 64-bit integer), since the current setting has some problems with JDBC apps that don't support generic annotations like OTHER. Most notably, Apache Spark cannot write into a DateTime64 column using the JDBC layer (and it probably could, since integers can be safely written into a DateTime64 column).

Activity

  1. trolley813 commented on Nov 18, 2020

    @trolley813
    Author

    Created PR #520 for fixing this.

  2. added this to the 0.2.5 release milestone on Dec 28, 2020
  3. zhicwu commented on Dec 29, 2020

    @zhicwu
    Contributor

    Thanks @trolley813. Do you have time to enhance the PR to support sub-second precision as well?

  4. trolley813 commented on Dec 30, 2020

    @trolley813
    Author

    @zhicwu Yes, I do. But unfortunately I don't know yet what I have to do. Will try to do it nevertheless.

  5. self-assigned this
    on Mar 5, 2021
  6. linked a pull request that will close this issueSupport more data types #589on Mar 5, 2021
  7. linked a pull request that will close this issueAdding DateTime64 as an available type #520on Mar 5, 2021
  8. added
    api-diagnostics
    jdbc
    legacy
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api-diagnosticsenhancementjdbclegacy

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions