-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
perf: Remove cast to boolean after comparison in optimizer #21022
perf: Remove cast to boolean after comparison in optimizer #21022
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21022 +/- ##
==========================================
- Coverage 79.20% 79.14% -0.07%
==========================================
Files 1583 1583
Lines 225109 225126 +17
Branches 2581 2581
==========================================
- Hits 178303 178179 -124
- Misses 46216 46357 +141
Partials 590 590 ☔ View full report in Codecov by Sentry. |
if let Some(schema) = lp_arena.get(lp_node).input_schema(lp_arena) { | ||
let field = aexpr.to_field(&schema, Context::Default, expr_arena)?; | ||
if field.dtype == *dtype { | ||
return Ok(Some(aexpr.clone())); |
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.
Do you know why this not returns None
? I understand it returns the same aexpr
untouched.
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.
Ah, now I see. Thanks!
all_horizontal
is used withjoin_where
#21009collapse_joins
without issue after we remove the extra castoptions: CastOptions
instead ofstrict: bool
Drive-by renames
fn coerce_types()
tofn optimize_exprs()
underConversionOptimizer
, as it also does other optimizations aside from type coercion.