snowflakedb / gosnowflake

Go Snowflake Driver
Apache License 2.0
292 stars 122 forks source link

Allow enableHigherPrecision to be used in arrow batches #1080

Closed Yifeng-Sigma closed 5 months ago

Yifeng-Sigma commented 5 months ago

Description

enableHigherPrecision in Arrow batches

Snowflake returns BigDecimal natively (from backend to driver) To preserve BigDecimal values within Arrow batches, set the enableHigherPrecision value to true in the context using `WithHigherPrecision“.

Benefits

This offers two main benefits: it helps avoid precision loss and defers the conversion to upstream services. Alternatively, without this setting, all non-zero scale numbers will be converted to float64, potentially resulting in loss of precision.

Checklist