Skip to content

chore: wire rint built in function#4372

Merged
comphead merged 1 commit into
apache:mainfrom
comphead:wire_math
May 21, 2026
Merged

chore: wire rint built in function#4372
comphead merged 1 commit into
apache:mainfrom
comphead:wire_math

Conversation

@comphead
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Part of #4150 .

Wire rint Apache Spark built in function

Rationale for this change

What changes are included in this PR?

How are these changes tested?


-- column with arithmetic
query
SELECT rint(v + 0.5) FROM test_rint
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some other unary math tests do literal arguments verification too

Suggested change
SELECT rint(v + 0.5) FROM test_rint
SELECT rint(v + 0.5) FROM test_rint
-- literal arguments
query
SELECT rint(0.5), rint(1.5), rint(-0.5), rint(2.5), rint(NULL), rint(cast('NaN' as double))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @martin-g in Comet we dont test EmptyRelation queries, Comet expects a source

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was confused by some examples in the other tests:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The idea is to test the UDF with a ScalarValue, so adding FROM respective_table is a quick fix.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh I see, makes sense, I'll add this in follow up PR, thanks!

@comphead comphead merged commit a675092 into apache:main May 21, 2026
154 of 155 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants