fix(hive): preserve column precision when scale is null#2191
Conversation
buildDataType guarded with columnSize == null || decimalDigits == null, returning bare type for DECIMAL(10) (precision set, scale null). The size-only branch was unreachable dead code. Guard on columnSize only, mirroring every sibling. Same fix as Sqlite OtterMind#2167 and MySQL OtterMind#2180. Fixes OtterMind#2189 Co-Authored-By: Claude <noreply@anthropic.com>
Live-database verification (same bug class)Verified the same
Hive has the identical code pattern; the fix (guard on |
|
Thanks for the verification note. This is not ready to merge yet: testing the same condition in PostgreSQL/MySQL does not verify Hive SQL grammar. Hive permits precision parameters for Please restrict the fix to Hive types that support precision arguments and add automated Hive generated-DDL tests for size-only, size-plus-scale, and unaffected primitive types. Please rebase onto the latest |
Related issue
Closes #2189
Summary
Same dead-branch bug as Sqlite #2167 and MySQL #2180. HiveColumnTypeEnum.buildDataType guarded with if (columnSize == null || decimalDigits == null), returning bare type for DECIMAL(10) (precision set, scale null). Changed to columnSize == null only, making the size-only branch reachable.
Verification
Contributor declaration
AI assistance: The fix, verification, and PR description were produced with Claude Code assistance.