fix(snowflake): preserve column precision when scale is null#2190
fix(snowflake): preserve column precision when scale is null#2190Aias00 wants to merge 2 commits into
Conversation
buildDataType guarded with columnSize == null || decimalDigits == null, returning bare type for NUMBER(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#2188 Co-Authored-By: Claude <noreply@anthropic.com>
Live-database verification (PostgreSQL 16)
Before the fix: the |
|
Thanks for adding verification. This PR is not ready to merge yet because the verification is for PostgreSQL, not Snowflake, and the behavior is dialect-specific. The affected Snowflake branch also includes integer aliases such as Please narrow the precision-only behavior to Snowflake types that actually support it, and add automated Snowflake generated-DDL tests covering every affected type family. Rebase onto the latest |
Related issue
Closes #2188
Summary
Same dead-branch bug as Sqlite #2167 and MySQL #2180. SnowflakeColumnTypeEnum.buildDataType guarded with if (columnSize == null || decimalDigits == null), returning bare type for NUMBER(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.