huaxingao commented on code in PR #14984:
URL: https://github.com/apache/iceberg/pull/14984#discussion_r3611386533
##########
spark/v4.2/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveViews.scala:
##########
@@ -53,61 +52,29 @@ case class ResolveViews(spark: SparkSession) extends
Rule[LogicalPlan] with Look
case u @ UnresolvedRelation(parts @ CatalogAndIdentifier(catalog, ident),
_, _) =>
ViewUtil
.loadView(catalog, ident)
- .map(createViewRelation(parts, _))
+ .map(createViewRelation(parts, catalog, _))
.getOrElse(u)
- case u @ UnresolvedTableOrView(CatalogAndIdentifier(catalog, ident), _, _)
=>
+ case u @ UnresolvedTableOrView(CatalogAndIdentifier(catalog, ident), _, _,
_) =>
ViewUtil
.loadView(catalog, ident)
.map(_ => ResolvedV2View(catalog.asViewCatalog, ident))
.getOrElse(u)
- case c @ CreateIcebergView(
- ResolvedIdentifier(_, _),
- _,
- query,
- columnAliases,
- columnComments,
- _,
- _,
- _,
- _,
- _,
- _,
- _) if query.resolved && !c.rewritten =>
- val aliased = aliasColumns(query, columnAliases, columnComments)
- c.copy(
- query = aliased,
- queryColumnNames = query.schema.fieldNames.toIndexedSeq,
- rewritten = true)
+ case c: CreateIcebergView if c.query.resolved && !c.rewritten =>
+ c.copy(rewritten = true)
Review Comment:
Since aliasing moved to `CreateV2ViewExec`, this rule just flips rewritten
and nothing else reads that field. Is the rule (and the `rewritten` field)
still needed, or can it be dropped? If it has to stay, a one-line comment on
why would help.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]