Skip to content

feat: support 2-argument ceil(value, scale) for Spark compatibility#21562

Open
SAY-5 wants to merge 1 commit intoapache:mainfrom
SAY-5:feat/ceil-two-arg-scale
Open

feat: support 2-argument ceil(value, scale) for Spark compatibility#21562
SAY-5 wants to merge 1 commit intoapache:mainfrom
SAY-5:feat/ceil-two-arg-scale

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 12, 2026

Extends ceil to accept an optional scale parameter for Spark compatibility: ceil(3.145, 2) returns 3.15.

Implementation is ceil(value * 10^scale) / 10^scale. Handles Float32/Float64 with Int64 scale, both scalar and array inputs.

Closes #21560

Extends the ceil function to accept an optional scale parameter,
matching Spark SQL behavior: ceil(value, scale) rounds up to the
specified number of decimal places.

Implementation: ceil(value, scale) = ceil(value * 10^scale) / 10^scale

Supports Float32 and Float64 with Int64 scale, both scalar and array.

Closes apache#21560
@github-actions github-actions bot added the functions Changes to functions implementation label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support 2-argument ceil(value, scale) for Spark

1 participant