You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/04/12 20:39:19 UTC

[GitHub] [iceberg] flyrain commented on a change in pull request #2438: Spark: Prevent setting sort-order by using "ALTER TABLE ... SET TBLPROPERTIES"

flyrain commented on a change in pull request #2438:
URL: https://github.com/apache/iceberg/pull/2438#discussion_r611938398



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
##########
@@ -199,6 +199,9 @@ public SparkTable alterTable(Identifier ident, TableChange... changes) throws No
           setSnapshotId = set;
         } else if ("cherry-pick-snapshot-id".equalsIgnoreCase(set.property())) {
           pickSnapshotId = set;
+        } else if ("sort-order".equalsIgnoreCase(set.property())) {
+          throw new UnsupportedOperationException("'sort-order' is a reserved table property. Please use the command " +
+                  "'ALTER TABLE ... WRITE ORDERED BY' to specify it.");

Review comment:
       NP. A new commit submitted for the comment. Thanks for the review.




-- 
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org