Skip to content

Support NUMBER type in JDBC#28147

Merged
findepi merged 1 commit intotrinodb:masterfrom
findepi:findepi/bd-jdbc
Feb 17, 2026
Merged

Support NUMBER type in JDBC#28147
findepi merged 1 commit intotrinodb:masterfrom
findepi:findepi/bd-jdbc

Conversation

@findepi
Copy link
Member

@findepi findepi commented Feb 6, 2026

It's mapped to Types.OTHER type. Mapping to Types.DECIMAL and
Types.NUMERIC seems more appropriate for SQL decimal and numeric
types respectively (Trino doesn't have SQL standard numeric yet), and
may be taken as a signal that ResultSet.getBigDecimal is the best way
to access the data.

Its Java class, as returned from ResultSetMetaData.getColumnClassName,
is java.lang.Number, because the ResultSet.getObject typically
returns java.math.BigDecimal but sometimes also returns/will return
java.lang.Double for Infinity and NaN values.

.

Release notes

not for release notes yet

@findepi findepi added the jdbc Relates to Trino JDBC driver label Feb 6, 2026
@cla-bot cla-bot bot added the cla-signed label Feb 6, 2026
@findepi findepi changed the title Support BIGDECIMAL type in JDBC Support NUMBER type in JDBC Feb 16, 2026
@findepi findepi force-pushed the findepi/bd-jdbc branch 2 times, most recently from 040cb09 to 7825cb3 Compare February 16, 2026 18:01
@wendigo
Copy link
Contributor

wendigo commented Feb 16, 2026

Drop merge commit

@findepi
Copy link
Member Author

findepi commented Feb 17, 2026

Copy link
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix assertions faiilures are relevant

It's mapped to `Types.OTHER` type.  Mapping to `Types.DECIMAL` and
`Types.NUMERIC` seems more appropriate for SQL `decimal` and `numeric`
types respectively (Trino doesn't have SQL standard `numeric` yet), and
may be taken as a signal that `ResultSet.getBigDecimal` is the best way
to access the data.

Its Java class, as returned from `ResultSetMetaData.getColumnClassName`,
is `java.lang.Number`, because the `ResultSet.getObject` typically
returns `java.math.BigDecimal` but sometimes also returns/will return
`java.lang.Double` for Infinity and NaN values.
@findepi findepi merged commit 180129d into trinodb:master Feb 17, 2026
53 checks passed
@findepi findepi deleted the findepi/bd-jdbc branch February 17, 2026 19:01
@github-actions github-actions bot added this to the 480 milestone Feb 17, 2026
@findepi findepi added the no-release-notes This pull request does not require release notes entry label Feb 17, 2026
@ebyhr ebyhr mentioned this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed jdbc Relates to Trino JDBC driver no-release-notes This pull request does not require release notes entry

Development

Successfully merging this pull request may close these issues.

3 participants