-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Avoid cloning in log::simplify
and power::simplify
#10086
Conversation
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.
💪 thanks @alamb
// log(base, number) | ||
let num_args = args.len(); | ||
if args.len() > 2 { | ||
return plan_err!("Expected log to have 1 or 2 arguments, got {num_args}"); |
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.
should this be an exec error to match similar patterns elsewhere?
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.
lets fix it in follow up. tbh we should unify error messaging for all builtin functions
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 the idea here is that simplify gets called as part of planning (not execution) so planning makes sense to me. Though I am not sure what practical difference it makes in this case 🤔
Co-authored-by: comphead <[email protected]>
…n into alamb/less_cloning
Which issue does this PR close?
Closes tinfoil-knight#1
Closes #10003
Follow on to #9983
Rationale for this change
in #9983 @tinfoil-knight ported over exp/power to be
ScalarUDF
s 🙏 -- while reviewing the PR I noticed that we could reduce some clones and worked up the code in tinfoil-knight#1What changes are included in this PR?
log::simplify
andpower::simplify
Are these changes tested?
Are there any user-facing changes?