rdblue commented on code in PR #9510:
URL: https://github.com/apache/iceberg/pull/9510#discussion_r1468937534
##########
spark/v3.5/spark-extensions/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ExtendedDataSourceV2Strategy.scala:
##########
@@ -123,6 +127,35 @@ case class ExtendedDataSourceV2Strategy(spark:
SparkSession) extends Strategy wi
allowExisting = allowExisting,
replace = replace) :: Nil
+ case AlterViewAs(ResolvedV2View(catalog, ident, _), queryText, query) =>
+ CreateV2ViewExec(
+ catalog = catalog,
+ ident = ident,
+ queryText = queryText,
+ columnAliases = Seq.empty,
+ columnComments = Seq.empty,
+ queryColumnNames = query.schema.fieldNames,
+ viewSchema = query.schema,
+ comment = None,
+ properties = Map.empty,
+ allowExisting = false,
+ replace = true) :: Nil
+
+ case SetViewProperties(ResolvedV2View(catalog, ident, _), properties) =>
+ val changes = properties.map {
+ case (property, value) => ViewChange.setProperty(property, value)
+ }.toSeq
+ AlterV2ViewExec(catalog, ident, changes) :: Nil
+
+ case UnsetViewProperties(ResolvedV2View(catalog, ident, view),
propertyKeys, ifExists) =>
+ if (!ifExists) {
+ propertyKeys.filterNot(view.properties.containsKey).foreach { property
=>
+ throw new AnalysisException(s"Attempted to unset non-existing
property '$property' in view $ident")
Review Comment:
We can handle this on the Iceberg side.
--
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]