Skip to content

feat: spark compatible ceil function#20703

Open
coderfender wants to merge 5 commits intoapache:mainfrom
coderfender:df_spark_ceil
Open

feat: spark compatible ceil function#20703
coderfender wants to merge 5 commits intoapache:mainfrom
coderfender:df_spark_ceil

Conversation

@coderfender
Copy link

@coderfender coderfender commented Mar 4, 2026

Which issue does this PR close?

  • Closes #.

Rationale for this change

  1. Add Spark-compatible ceil function to datafusion-spark

What changes are included in this PR?

  1. Implements SparkCeil UDF supporting Float32/64, Int8/16/32/64, and Decimal12
  2. Returns Int64 for all numeric types except Decimal (matches Spark 3.x behavior)
  3. Decimal inputs preserve scale (ceil within the fractional part)

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) spark labels Mar 4, 2026
@coderfender
Copy link
Author

@martin-g please review whenever you get a chance. Thank you

@coderfender coderfender force-pushed the df_spark_ceil branch 3 times, most recently from f65f61e to 6132f42 Compare March 4, 2026 22:34
@comphead
Copy link
Contributor

comphead commented Mar 4, 2026

Thanks @coderfender btw there is another PR for ceil #20593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spark sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants