klion26 opened a new pull request, #9169:
URL: https://github.com/apache/arrow-rs/pull/9169
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases. You can
link an issue to this PR using the GitHub syntax.
-->
- Closes #8982.
# What changes are included in this PR?
This PR adds `lossy` in `CastOptions` which wants to controlling precision
loss in casts.
Behavior matrix:
| `safe` | `lossy` | Behavior |
| --- | --- | --- |
| `true` | `false` | Default. Invalid casts return Null, Lossy
casts(e.g., float to int) return NULL. |
| `true` | `true` | Invalid casts return Null, Lossy casts are allowed
(truncation occurs). |
| `false` | `false` | Invalid casts return an error. Lossy casts return an
error. |
| `false` | `true` | Invalid casts return an error. Lossy casts are
allowed (truncation occurs). |
# Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are
they covered by existing tests)?
-->
No tests, this added a new flag.
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
If there are any breaking changes to public APIs, please call them out.
-->
Yes, changed the `CastOptions`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]