-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix 305 by using a scalar uint as param for zero param functions #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #307 +/- ##
==========================================
- Coverage 76.19% 76.18% -0.02%
==========================================
Files 141 141
Lines 23786 23792 +6
==========================================
+ Hits 18123 18125 +2
- Misses 5663 5667 +4
Continue to review full report at Codecov.
|
f2df75e to
0e64615
Compare
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Ok(true) | ||
| } | ||
|
|
||
| fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this approach, while a hack, seems reasonable to me
I agree with the comments on #303 (comment) that this does seem like a hack (it would be nicer to have an enum or something that made this case explicit).
I would like to see this expectation documented near the place where a user would define a UDF as well - either as an example or as a doccomment. Perhaps somewhere in
https://github.com/apache/arrow-datafusion/blob/master/datafusion/src/physical_plan/udf.rs
Or bonus points for adding an example:
https://github.com/apache/arrow-datafusion/blob/master/datafusion-examples/examples/simple_udf.rs
cc; @msathis who I think faced a similar challenge in now(): #288
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs in the next PR is fine. I think @jorgecarleitao had an alternate suggestion in #303 (comment)
see #328
I'll try to add comments in the next pull request - is that okay? |
|
Docs in the next PR is fine. I think @jorgecarleitao had an alternate suggestion in #303 (comment) |
|
if #328 can be merged then this can be closed |
|
closing this as we are aligned on using |
…pache#307) * DataFusion bump to use valid typify instance for build with RustFMT * specify syn version --------- Co-authored-by: Jeremy Dyer <jdye64@gmail.com>
Which issue does this PR close?
fix 305 by using a null array as param for zero param functions
Closes #305.
Rationale for this change
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
What changes are included in this PR?
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
Are there any user-facing changes?
If there are user-facing changes then we may require documentation to be updated before approving the PR.
If there are any breaking changes to public APIs, please add the
breaking changelabel.