joellubi commented on code in PR #1456:
URL: https://github.com/apache/arrow-adbc/pull/1456#discussion_r1459477366


##########
go/adbc/driver/snowflake/statement.go:
##########
@@ -253,7 +331,7 @@ func toSnowflakeType(dt arrow.DataType) string {
                if ts.TimeZone == "" {
                        return fmt.Sprintf("timestamp_ntz(%d)", prec)
                }
-               return fmt.Sprintf("timestamp_tz(%d)", prec)
+               return fmt.Sprintf("timestamp_ltz(%d)", prec)

Review Comment:
   We're changing it from `tz` to `ltz` here. The reason for the change is that 
the Snowflake 
[TIMESTAMP_LTZ](https://docs.snowflake.com/en/sql-reference/data-types-datetime#timestamp-ltz-timestamp-ntz-timestamp-tz)
 type seems to be much more closely aligned with Arrow Timestamp semantics. 
Both Arrow and the `ltz` variant store time since UTC epoch, along with 
timezone metadata used primarily for presentation in applications. The `tz` 
variant stores a fixed offset which is something that Arrow doesn't represent 
natively. So we can read either variant and handle offsets, etc but it's 
preferred to write only the `ltz` variant when starting from an Arrow type.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to