-
Notifications
You must be signed in to change notification settings - Fork 206
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
mark int type explicitly as int64 #332
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -293,9 +293,9 @@ func assignValue(dst *octosql.Value, src parquet.Value) error { | |
case parquet.Boolean: | ||
*dst = octosql.NewBoolean(src.Boolean()) | ||
case parquet.Int32: | ||
*dst = octosql.NewInt(int(src.Int32())) | ||
*dst = octosql.NewInt(src.Int64()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this one might break (that is, if it's Int32 and you ask for Int64, the parquet library won't figure out that it can just upcast). Let's please leave it like it was, so There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the code that I can see in parquet looks like that:
so we would simply cast the 64 bit integer to 32 bit and back There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added your suggestion as a separate commit, in case you want to reconsider it, it's just a simple revert away :) |
||
case parquet.Int64: | ||
*dst = octosql.NewInt(int(src.Int64())) | ||
*dst = octosql.NewInt(src.Int64()) | ||
case parquet.Int96: | ||
*dst = octosql.NewString(src.Int96().String()) | ||
case parquet.Float: | ||
|
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.
let me know if that's OK for you, I think we could safely use the 32 bit here as before. Most of the PR here is to adjust for that type change.