jackwener commented on code in PR #4013:
URL: https://github.com/apache/arrow-datafusion/pull/4013#discussion_r1008713111
##########
datafusion/core/src/physical_plan/planner.rs:
##########
@@ -1013,7 +1013,10 @@ impl DefaultPhysicalPlanner {
LogicalPlan::TableScan(..) => {
self.create_initial_plan(input,
session_state).await
}
- _ => Err(DataFusionError::Plan("SubqueryAlias should
only wrap TableScan".to_string()))
+ LogicalPlan::Filter(..) => {
+ self.create_initial_plan(input,
session_state).await
+ }
+ _ => Err(DataFusionError::Plan("SubqueryAlias should
only wrap TableScan or Filter".to_string()))
Review 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 from `Spark`
`Spark Subquery` don't include alias.
```scala
case class Subquery(child: LogicalPlan, correlated: Boolean) extends
OrderPreservingUnaryNode {
override def output: Seq[Attribute] = child.output
override protected def withNewChildInternal(newChild: LogicalPlan):
Subquery =
copy(child = newChild)
}
```
I think your thought is reasonable. We shouldn't put alias in multiple place.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]