-
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
feat(substrait): add wildcard handling to producer #12987
Conversation
@@ -103,9 +106,13 @@ pub fn to_substrait_plan(plan: &LogicalPlan, ctx: &SessionContext) -> Result<Box | |||
// Parse relation nodes | |||
// Generate PlanRel(s) | |||
// Note: Only 1 relation tree is currently supported | |||
|
|||
let plan = Arc::new(ExpandWildcardRule::new()) |
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.
Can we perhaps add a comment explaining why this function call is necessary?
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.
@alamb thanks. does the ci failure seem flaky to you? Or should I actually run docs update script? |
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.
+1
Rationale for this change
Current roundtrip tests for wildcard expression pass only because tests themselves optimize the plan beforehand and "optimize" the wildcard away before actually doing a roundtrip. Producer should be able to convert the plan to substrait even if the plan isn't optimized beforehand.
What changes are included in this PR?
ExpandWildcardRule
at the top of the producer. Substrait doesn't have anything analogous to the wildcard, so the easiest solution I found was to run ExpandWildcardRule to work around that. The main thing is that it's run as part of the producer so the producer no longer assumes that full optimizer has been run before.Are these changes tested?
yes
Are there any user-facing changes?
yes, producer can convert wildcard expression independently of the optimizer.