You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "aguilaredu (via GitHub)" <gi...@apache.org> on 2026/06/07 23:03:47 UTC
[PR] bugfix: changed return type of spark's width_bucket to i64 [datafusion]
aguilaredu opened a new pull request, #22811:
URL: https://github.com/apache/datafusion/pull/22811
## 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. For example `Closes #123` indicates that this PR will close issue #123.
-->
- Closes #.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## 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)?
-->
## 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 add the `api change` label.
-->
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] bugfix: changed return type of spark's width_bucket to i64 [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #22811:
URL: https://github.com/apache/datafusion/pull/22811#issuecomment-4748342683
thanks @aguilaredu
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] bugfix: changed return type of spark's width_bucket to i64 [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on code in PR #22811:
URL: https://github.com/apache/datafusion/pull/22811#discussion_r3418605775
##########
datafusion/spark/src/function/math/width_bucket.rs:
##########
@@ -466,8 +466,8 @@ mod tests {
Arc::new(IntervalYearMonthArray::from(vals.to_vec()))
}
- fn downcast_i32(arr: &ArrayRef) -> &Int32Array {
- arr.as_any().downcast_ref::<Int32Array>().unwrap()
+ fn downcast_i64(arr: &ArrayRef) -> &Int64Array {
+ arr.as_any().downcast_ref::<Int64Array>().unwrap()
Review Comment:
we can driveby refactor to replace usages of `downcast_i64` with the simpler [`as_primitive`](https://docs.rs/arrow/latest/arrow/array/trait.AsArray.html#method.as_primitive)
e.g.
```rust
let out = out.as_primitive::<Int64Type>();
```
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] bugfix: changed return type of spark's width_bucket to i64 [datafusion]
Posted by "aguilaredu (via GitHub)" <gi...@apache.org>.
aguilaredu commented on PR #22811:
URL: https://github.com/apache/datafusion/pull/22811#issuecomment-4731228866
@Jefffrey I have made the changes you suggested and fixed the CI failure. Would appreciate your feedback!
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] bugfix: changed return type of spark's width_bucket to i64 [datafusion]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22811:
URL: https://github.com/apache/datafusion/pull/22811#issuecomment-4731934923
<!-- semver-check-comment -->
Thank you for opening this pull request!
Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch).
<details>
<summary>Details</summary>
```
error: `cargo metadata` exited with an error: Updating crates.io index
error: failed to get `arrow` as a dependency of package `datafusion-common v54.0.0 (/home/runner/work/datafusion/datafusion/datafusion/common)`
Caused by:
failed to load source for dependency `arrow`
Caused by:
unable to update registry `crates-io`
Caused by:
download of ar/ro/arrow failed
Caused by:
curl failed
Caused by:
[18] Transferred a partial file
```
</details>
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] bugfix: changed return type of spark's width_bucket to i64 [datafusion]
Posted by "aguilaredu (via GitHub)" <gi...@apache.org>.
aguilaredu commented on PR #22811:
URL: https://github.com/apache/datafusion/pull/22811#issuecomment-4720507595
> looks like some CI checks are failing
Thanks for the review @Jefffrey . Looking into it.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] bugfix: changed return type of spark's width_bucket to i64 [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey merged PR #22811:
URL: https://github.com/apache/datafusion/pull/22811
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org