nastra commented on code in PR #9423:
URL: https://github.com/apache/iceberg/pull/9423#discussion_r1464613485
##########
spark/v3.5/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveViews.scala:
##########
@@ -59,6 +62,10 @@ case class ResolveViews(spark: SparkSession) extends
Rule[LogicalPlan] with Look
loadView(catalog, ident)
.map(_ => ResolvedV2View(catalog.asViewCatalog, ident))
.getOrElse(u)
+
+ case c@CreateIcebergView(ResolvedIdentifier(_: ViewCatalog, ident), _, _,
_, _, query, _, _) =>
+ ViewHelper.verifyTemporaryObjectsNotExists(false,
Spark3Util.toV1TableIdentifier(ident), query, Seq.empty)
Review Comment:
I've changed things so that we're not calling the Spark version for checking
temp views/function. I'm having some difficulty testing temporary functions
referenced by views and left a TODO for now
> Last, checks like this one should be done in a validation rule, not in
ResolveViews. I think this was originally in a validation rule. Why did that
change?
After re-reading
https://github.com/apache/iceberg/pull/9423#discussion_r1454179584 for some
reason I thought we might as well get rid of the validation rule and do the
check in `ResolveViews`. I've reverted this change now so that we do the
validations in a separate rule.
--
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]