rdblue commented on code in PR #9421:
URL: https://github.com/apache/iceberg/pull/9421#discussion_r1443275368
##########
spark/v3.5/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveViews.scala:
##########
@@ -45,14 +47,17 @@ case class ResolveViews(spark: SparkSession) extends
Rule[LogicalPlan] with Look
protected lazy val catalogManager: CatalogManager =
spark.sessionState.catalogManager
override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
- case u@UnresolvedRelation(nameParts, _, _)
- if catalogManager.v1SessionCatalog.isTempView(nameParts) =>
+ case u@UnresolvedRelation(nameParts, _, _) if isTempView(nameParts) =>
u
case u@UnresolvedRelation(parts@CatalogAndIdentifier(catalog, ident), _,
_) =>
loadView(catalog, ident)
.map(createViewRelation(parts, _))
.getOrElse(u)
+
+ case DropIcebergView(r@ResolvedIdentifier(catalog, ident), ifExists)
+ if isTempView(ident.asMultipartIdentifier) || !isViewCatalog(catalog) =>
+ DropView(r, ifExists)
Review Comment:
Why do we need to convert back to a non-Iceberg plan? Is it that we always
convert in the pre-substitution batch? If so, is it reasonable to detect
whether it is an Iceberg `ViewCatalog` before converting rather than converting
back?
--
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]