Skip to content

[branch-54]: backport #22811 (bugfix: changed return type of spark's width_bucket to i64) - #23087

Merged
mbutrovich merged 1 commit into
apache:branch-54from
mbutrovich:branch-54-22811
Jun 22, 2026
Merged

mbutrovich merged 1 commit into
apache:branch-54from
mbutrovich:branch-54-22811

Conversation

@mbutrovich

Copy link
Copy Markdown
Contributor

backport #22811 to branch-54 in anticipation of 54.1.0 release. DataFusion Comet encountered this issue while trying to upgrade to DF 54.0.0, so it would ease that upgrade for Comet if this were backported.

)

## Which issue does this PR close?
- Closes apache#22602

## Rationale for this change
The return type of this function in Spark is int64. It is changed here
to match Sparks behavior.

## What changes are included in this PR?
Changed the return type of Spark's `width_bucket` from i32 to i64.

## Are these changes tested?
Yes, all existing unit tests in `width_bucket.rs` pass.

## Are there any user-facing changes?
- Spark consumers should expect a different data type when calling the
`width_bucket` function.
- No API changes.

(cherry picked from commit 6c2221d)
@github-actions github-actions Bot added the spark Changes to datafusion-spark crate label Jun 22, 2026

@comphead comphead left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double checked with Spark

  override def dataType: DataType = LongType

@mbutrovich
mbutrovich merged commit aa59c66 into apache:branch-54 Jun 22, 2026
32 checks passed
@mbutrovich
mbutrovich deleted the branch-54-22811 branch June 22, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spark Changes to datafusion-spark crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants