You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/05/11 04:45:23 UTC

[GitHub] [spark] huaxingao commented on a diff in pull request #36498: [SPARK-37878][SQL][FOLLOWUP] V1Table should always carry the "location" property

huaxingao commented on code in PR #36498:
URL: https://github.com/apache/spark/pull/36498#discussion_r869865835


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -3288,7 +3288,15 @@ class AstBuilder extends SqlBaseParserBaseVisitor[AnyRef] with SQLConfHelper wit
         throw QueryParsingErrors.cannotCleanReservedTablePropertyError(
           PROP_EXTERNAL, ctx, "please use CREATE EXTERNAL TABLE")
       case (PROP_EXTERNAL, _) => false
-      case _ => true
+      // It's safe to set whatever table comment, so we don't make it a reserved table property.
+      case (PROP_COMMENT, _) => true
+      case (k, _) =>

Review Comment:
   That's where I got confused too. If we want to keep the code above to issue a better error message, why not adding something in parallel such as 
   ```
   case (PROP_IS_MANAGED_LOCATION, _) if !legacyOn =>
       throw QueryParsingErrors.cannotCleanReservedTablePropertyError(
          PROP_IS_MANAGED_LOCATION, ctx, "xxxxxx")
   case (PROP_IS_MANAGED_LOCATION, _) =>
       false
   ```



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org