You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2024/03/12 11:09:30 UTC

Re: [PR] [SPARK-47169][SQL] Disable bucketing on collated columns [spark]

MaxGekk commented on code in PR #45260:
URL: https://github.com/apache/spark/pull/45260#discussion_r1521272118


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala:
##########
@@ -362,6 +362,13 @@ case class PreprocessTableCreation(catalog: SessionCatalog) extends Rule[Logical
           case other => failAnalysis(s"Cannot use ${other.catalogString} for sorting column")
         }
 
+        schema.filter(f => normalizedBucketSpec.bucketColumnNames.contains(f.name))
+          .foreach { field =>
+          if (!BucketingUtils.canBucketOn(field.dataType)) {
+            throw QueryCompilationErrors.invalidBucketColumnDataTypeError(field.dataType)
+          }
+        }

Review Comment:
   Fix indentation:
   ```suggestion
             .foreach { field =>
               if (!BucketingUtils.canBucketOn(field.dataType)) {
                 throw QueryCompilationErrors.invalidBucketColumnDataTypeError(field.dataType)
               }
             }
   ```



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