manuzhang commented on code in PR #10774:
URL: https://github.com/apache/iceberg/pull/10774#discussion_r1809013863


##########
spark/v3.5/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/parser/extensions/IcebergSqlExtensionsAstBuilder.scala:
##########
@@ -226,11 +226,13 @@ class IcebergSqlExtensionsAstBuilder(delegate: 
ParserInterface) extends IcebergS
     }
 
     val distributionMode = if (distributionSpec != null) {
-      DistributionMode.HASH
-    } else if (orderingSpec.UNORDERED != null || orderingSpec.LOCALLY != null) 
{
-      DistributionMode.NONE
+      Some(DistributionMode.HASH)
+    } else if (orderingSpec.UNORDERED != null) {

Review Comment:
   @RussellSpitzer This method is for ALTER only.
   
   
https://github.com/apache/iceberg/blob/c16cefa5015dda417f80e0d59124cd92448787ab/spark/v3.5/spark-extensions/src/main/antlr/org.apache.spark.sql.catalyst.parser.extensions/IcebergSqlExtensions.g4#L73
   
   @szehon-ho The result of this method can be one of `HASH`, `NONE`, `RANGE` 
or unchanged depending on the combination of `distributionSpec` and 
`orderSpec`. Thus, we cannot just return None when `distributionSpec` is not 
set.
   
   



-- 
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: issues-unsubscr...@iceberg.apache.org

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


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

Reply via email to