Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix metadata reflection for DECIMAL columns - with test #88

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

lhofhansl
Copy link
Contributor

JDBC describes that COLUMN_SIZE for a DECIMAL type should reflect its total number of digits, whereas DECIMAL_DIGITS describes it numeric scale.

See: https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)

This does the right thing for all other types (where numeric_precision is null), except for INTEGER and LONG, where currently in DuckDB this reports 32 and 64, resp, where it should report 10 and 19. That's for another PR, I think.

@lhofhansl lhofhansl changed the title Fix metadata reflection for DECIMAL columns Fix metadata reflection for DECIMAL columns - with test Sep 27, 2024
@Mause Mause merged commit 2876767 into duckdb:main Oct 1, 2024
7 checks passed
@Mause
Copy link
Member

Mause commented Oct 1, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants