feat(spark): implement Spark math function rint#16924
Conversation
alamb
left a comment
There was a problem hiding this comment.
Looks good to me
@shehabgamin and @comphead in case you would like a chance to review too
|
Thank you for driving this @chenkovsky |
shehabgamin
left a comment
There was a problem hiding this comment.
Just 1 comment. I think it's okay to merge as is and iterate further though!
| pub fn new() -> Self { | ||
| Self { | ||
| signature: Signature::one_of( | ||
| vec![Exact(vec![Float64]), Exact(vec![Float32])], |
There was a problem hiding this comment.
According to these docs, the input type might be a little bit more flexible?
https://docs.databricks.com/aws/en/sql/language-manual/functions/rint#arguments
There was a problem hiding this comment.
I added more types. please review it again
|
|
||
| fn output_ordering(&self, input: &[ExprProperties]) -> Result<SortProperties> { | ||
| // round preserves the order of the first argument | ||
| let value = &input[0]; |
There was a problem hiding this comment.
it is good to check is not empy
comphead
left a comment
There was a problem hiding this comment.
lgtm thanks @chenkovsky, some minors
|
Thanks @chenkovsky and @comphead and @shehabgamin |
* feat: spark rint * support all numeric * update * check empty for output ordering
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
implement spark rint udf
Are these changes tested?
UT
Are there any user-facing changes?
No