-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-911238: Add WithOriginalTimestamp context switch #916
Conversation
0eaf5dc
to
b89711e
Compare
b89711e
to
dd1f4c7
Compare
// ArrowSnowflakeTimestampToTime converts original timestamp returned by Snowflake to time.TIme | ||
func ArrowSnowflakeTimestampToTime(rec arrow.Record, rb *ArrowBatch, colIdx int, recIdx int) *time.Time { | ||
scale := int(rb.scd.RowSet.RowType[colIdx].Scale) | ||
dbType := strings.ToUpper(rb.scd.RowSet.RowType[colIdx].Type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we can encapsulate scale, dbtype and loc in a new structure? that way we wouldn't have to pass the whole ArrowBatch to the method? Just an idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is a good option. In such case a driver user will have to extract data from ArrowBatch by himself and create such object to pass. Moreover scd and loc aren't public.
Description
Add WithOriginalTimestamp context switch.
Checklist
make fmt
to fix inconsistent formatsmake lint
to get lint errors and fix all of them