Uh oh!
There was an error while loading. Please reload this page.
Support SubqueryAlias wrap filter. - #4013
Conversation
| LogicalPlan::Filter(..) => { | ||
| self.create_initial_plan(input, session_state).await | ||
| } | ||
| _ => Err(DataFusionError::Plan("SubqueryAlias should only wrap TableScan or Filter".to_string())) |
There was a problem hiding this comment.
Ideally we should be able to support wrapping any plan in a subquery with alias (this could also simplify some planning code).
But I got some errors trying this before.
#3927
There was a problem hiding this comment.
I may get your point. You hope to unify alias in the same place
Current, alias can exist two part.
- SubqueryAlias
- Projection Alias
This implementation is different fromSpark
Spark Subquery don't include alias.
caseclassSubquery(child: LogicalPlan, correlated: Boolean) extendsOrderPreservingUnaryNode {
overridedefoutput:Seq[Attribute] = child.output
overrideprotecteddefwithNewChildInternal(newChild: LogicalPlan):Subquery=
copy(child = newChild)
}I think your thought is reasonable. We shouldn't put alias in multiple place.
We have two choices:
- Just SubqueryAlias can contains alias
- like spark, Subquery don't contain alias
I also agree with former, which is more suitable for the current situation of datafusion
There was a problem hiding this comment.
This PR is just a tmp solution for #4014.
When I try to fix Integrations test, I add these code to fix it.
Which issue does this PR close?
part of #3927
Rationale for this change
After remove
eliminate cross joininplan_selection().What changes are included in this PR?
Are there any user-facing changes?