szehon-ho commented on code in PR #10774:
URL: https://github.com/apache/iceberg/pull/10774#discussion_r1755110580
##########
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:
Why not just return None when its not set here? I thought that's more
inline with the goal of the pr (to not override default unless explicitly set).
##########
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:
Why not just return None when distributionSpec not set here? I thought
that's more inline with the goal of the pr (to not override default unless
explicitly 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: [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]