Skip to content

[Java] JdbcFieldInfo is insufficient for proper type inference #35916

Closed

Description

@lidavidm

Describe the enhancement requested

The APIs only let us infer the type based on the data type, precision, and scale, effectively. But in the wild, there are always exceptions; for example, the JDBC driver for PostgreSQL maps both TIMESTAMP WITHOUT TIME ZONE and TIMESTAMP WITH TIME ZONE to just Types.TIMESTAMP, so arrow-jdbc dutifully maps them both to naïve timestamps (wrong!).

  • JdbcFieldInfo should expose all the available information it gets.
  • For convenience, it should also work with DatabaseMetaData#getColumns.
  • We need a way to override how JdbcConsumers are constructed. (ArrowVectorIterator hardcodes calls to JdbcToArrowUtils#getConsumer.)
  • We should integration test with popular databases (PostgreSQL, MySQL, SQL Server, SQLite, DuckDB, others?)

Component(s)

Java

Activity

  1. self-assigned this
    on Jun 5, 2023
  2. added a commit that references this issue on Aug 14, 2023
  3. added this to the 14.0.0 milestone on Aug 14, 2023
  4. removed their assignment
    on Aug 14, 2023
  5. added a commit that references this issue on Nov 13, 2023
  6. added a commit that references this issue on Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions