-
Notifications
You must be signed in to change notification settings - Fork 706
feat(optimizer): add FilterProjectRule #945
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
|
unable to trigger it before supporting subquery? e.g., |
Codecov Report
@@ Coverage Diff @@
## main #945 +/- ##
============================================
+ Coverage 71.43% 71.84% +0.40%
Complexity 2766 2766
============================================
Files 978 972 -6
Lines 57824 56609 -1215
Branches 1790 1787 -3
============================================
- Hits 41308 40668 -640
+ Misses 15625 15051 -574
+ Partials 891 890 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Please verify it with unit tests |
|
Can you please add some plan tests in |
|
Fixed the assert error when calling This was not triggered before, because the largest index was always selected... |
| logical_plan: | | ||
| LogicalProject { exprs: [$1], expr_alias: [Some("v1")] } | ||
| LogicalScan { table: "t", columns: ["_row_id", "v1", "v2"] } | ||
| batch_plan: | |
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.
Is it possible to test only logical_plan here?
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 had this idea too. We can split logical optimzation from gen_batch_query_plan (in a next PR).
But in tests, which one do you think is better:
logical_planis logically optimized plan.- add a separate
logical_plan_optimized
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.
Prefer optimized_logical_plan
https://spark.apache.org/docs/latest/sql-ref-syntax-qry-explain.html
What's changed and what's your intention?
LogicalProject::with_mapping: should usewith_capacityto create aFixedBitSetwith explicit capacity instead ofcollect.Checklist
Refer to a related PR or issue link (optional)
part of #842