Skip to content

go/adbc/driver/snowflake: NUMBER(n, 0) values get truncated #1277

@CurtHagenlocher

Description

@CurtHagenlocher

When the "high precision" switch is disabled, the Go Snowflake drivers return NUMBER(n, 0) values as int64s. For values which are too large to fit in 64 bits, it simply discards the upper 64 bits and returns the lower 64 bits without warning.

The "right thing" is particularly hard to figure out here because of the property of Snowflake that integer types are all aliases for NUMBER(38, 0), which means that even if the user thought they were creating an int32 columns it's actually stored as a decimal128-equivalent in the Snowflake schema. The best choice might be to error out when there's a value that's too large.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions