-
Notifications
You must be signed in to change notification settings - Fork 3.9k
ARROW-3158: [C++] Handle float truncation during casting #2503
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
Conversation
| CastOptions() | ||
| : allow_int_overflow(false), | ||
| allow_time_truncate(false), | ||
| allow_float_truncate(true) {} |
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.
True is required to keep the current behavior in the python tests.
This will be set to False by default via #2504
xhochy
left a comment
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.
+1, LGTM
|
Thanks Uwe! |
| allow_time_truncate(false), | ||
| allow_float_truncate(true) {} | ||
|
|
||
| explicit CastOptions(bool safe) |
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 annotate these methods as internal / experimental. I'm not sure what will be the best way longer-term to manage these flags
…safe casts Depends on both #2497 and #2503 Author: Krisztián Szűcs <[email protected]> Closes #2504 from kszucs/ARROW-2799 and squashes the following commits: 7bf9efd <Krisztián Szűcs> unsafe table creation during parquet dataset partitioning 38dfea3 <Krisztián Szűcs> disallow float truncation by default 515a393 <Krisztián Szűcs> Table.from_pandas safe option 2c82074 <Krisztián Szűcs> check-format 80e1478 <Krisztián Szűcs> lint e0838ce <Krisztián Szűcs> wire CastOptions through the API 2961094 <Krisztián Szűcs> set allow_float_truncate true by default 194e476 <Krisztián Szűcs> allow truncate float option and its implementation
No description provided.