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 decimal handling #37

Merged
merged 6 commits into from
Mar 27, 2024
Merged

Fix decimal handling #37

merged 6 commits into from
Mar 27, 2024

Conversation

elefeint
Copy link
Contributor

@elefeint elefeint commented Mar 27, 2024

This PR fixes the decimal column DESCRIBE failing with:

  Query failed with message: Not implemented Error: Enum value: 'DECIMAL(18,3)'
  not implemented

It was happening because I took the DuckDB type name from information schema and tried to infer the DuckDB enum type from it. But of course, the enum is "decimal", not "decimal(18,3).

I also opportunistically fixed decimal scale/precision handling and added a test for create table / describe for every type.

@elefeint elefeint requested a review from Y-- March 27, 2024 00:54
Copy link
Contributor

@Y-- Y-- left a comment

Choose a reason for hiding this comment

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

LGTM!

src/sql_generator.cpp Outdated Show resolved Hide resolved
@elefeint elefeint merged commit afb4a2b into main Mar 27, 2024
1 check passed
@elefeint elefeint deleted the fix_decimal branch March 27, 2024 13:51
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