Skip to content

fix(go/adbc/driver/snowflake): Fix integration tests by fixing timestamp handling#889

Merged
lidavidm merged 3 commits intoapache:mainfrom
zeroshade:snowflake-timestamps
Jul 11, 2023
Merged

fix(go/adbc/driver/snowflake): Fix integration tests by fixing timestamp handling#889
lidavidm merged 3 commits intoapache:mainfrom
zeroshade:snowflake-timestamps

Conversation

@zeroshade
Copy link
Member

Currently relies on apache/arrow#36569 being merged first.

@zeroshade zeroshade requested a review from lidavidm July 8, 2023 17:39
Comment on lines +156 to +158
return fmt.Sprintf("timestamp_ntz(%d)", prec)
}
return fmt.Sprintf("timestamp_ltz(%d)", prec)
return fmt.Sprintf("timestamp_tz(%d)", prec)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, whoops.

dt := &arrow.TimestampType{Unit: arrow.Nanosecond}
// we convert each value to UTC since we have timezone information
// with the data that lets us do so.
dt := &arrow.TimestampType{TimeZone: "UTC", Unit: arrow.TimeUnit(srcMeta.Scale / 3)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we bank on the scale being consistent like that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far as I can tell from testing and the docs on the data types, it seems so.

@zeroshade zeroshade marked this pull request as ready for review July 10, 2023 23:59
@lidavidm lidavidm added this to the ADBC Libraries 0.6.0 milestone Jul 11, 2023
@lidavidm lidavidm merged commit 0624550 into apache:main Jul 11, 2023
@zeroshade zeroshade deleted the snowflake-timestamps branch July 11, 2023 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants