szehon-ho commented on code in PR #53532:
URL: https://github.com/apache/spark/pull/53532#discussion_r2633221269
##########
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala:
##########
@@ -128,6 +128,25 @@ class ResolveSessionCatalog(val catalogManager:
CatalogManager)
case DropColumns(ResolvedV1TableIdentifier(ident), _, _) =>
throw QueryCompilationErrors.unsupportedTableOperationError(ident, "DROP
COLUMN")
+ // V1 and hive tables do not support constraints
+ case AddConstraint(ResolvedV1TableIdentifier(ident), _) =>
+ throw QueryCompilationErrors.unsupportedTableOperationError(ident, "ADD
CONSTRAINT")
+
+ case DropConstraint(ResolvedV1TableIdentifier(ident), _, _, _) =>
+ throw QueryCompilationErrors.unsupportedTableOperationError(ident, "DROP
CONSTRAINT")
+
+ case a: AddCheckConstraint
Review Comment:
this seems a bit fragile. I wondering, what is the current behavior? I
assume it would not match DataSourceV2Strategy case, and fall through?
--
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]