-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update signature for Expr.name so that schema is no longer required #3336
Conversation
use datafusion_common::{Result, ScalarValue}; | ||
|
||
#[test] | ||
fn format_case_when() -> Result<()> { |
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 added this test just to demonstrate the difference between Expr
Display
, Debug
, and name()
. I plan on adding more tests in future PRs to cover other expressions.
Codecov Report
@@ Coverage Diff @@
## master #3336 +/- ##
==========================================
+ Coverage 85.74% 85.82% +0.08%
==========================================
Files 294 294
Lines 53770 53745 -25
==========================================
+ Hits 46104 46127 +23
+ Misses 7666 7618 -48
📣 We’re building smart automated test selection to slash your CI/CD build times. 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.
Looks like a great improvement to me. Thanks @andygrove
use datafusion_common::{Result, ScalarValue}; | ||
|
||
#[test] | ||
fn format_case_when() -> Result<()> { |
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.
❤️
_ => { | ||
// we should not be trying to create a name for the expression | ||
// based on the input schema but this is the current behavior | ||
// see https://github.com/apache/arrow-datafusion/issues/2456 |
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.
Looks like #2456 could be closed too, perhaps
Benchmark runs are scheduled for baseline = 3956fc2 and contender = dadd2dc. dadd2dc is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
…pache#3336) * Update signature for Expr.name so that schema is no longer required * remove some duplicate code * clippy
Which issue does this PR close?
Part of #3330
Rationale for this change
The schema argument to
Expr.name
was not used and not needed.What changes are included in this PR?
Expr.name
Display
andDebug
traitsAre there any user-facing changes?
Yes, API change.