-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-17068][SQL] Make view-usage visible during analysis #14657
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ package org.apache.spark.sql.catalyst.plans.logical | |
|
|
||
| import scala.collection.mutable.ArrayBuffer | ||
|
|
||
| import org.apache.spark.sql.catalyst.TableIdentifier | ||
| import org.apache.spark.sql.catalyst.analysis.MultiInstanceRelation | ||
| import org.apache.spark.sql.catalyst.expressions._ | ||
| import org.apache.spark.sql.catalyst.expressions.aggregate.AggregateExpression | ||
|
|
@@ -693,7 +694,11 @@ case class LocalLimit(limitExpr: Expression, child: LogicalPlan) extends UnaryNo | |
| } | ||
| } | ||
|
|
||
| case class SubqueryAlias(alias: String, child: LogicalPlan) extends UnaryNode { | ||
| case class SubqueryAlias( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should document that, if the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm shall we just use a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will follow-up on the documentation. The alias can be different from the view identifier. The identifier also contains the name of the database. We would lose information if we would try to put in the alias. |
||
| alias: String, | ||
| child: LogicalPlan, | ||
| view: Option[TableIdentifier]) | ||
| extends UnaryNode { | ||
|
|
||
| override def output: Seq[Attribute] = child.output.map(_.withQualifier(Some(alias))) | ||
| } | ||
|
|
||
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.
we are too conservative here,
CatalogTable.tableTypeshould never be null, and we use this assumption in a lot of places.