dbtsai commented on a change in pull request #26929: [SPARK-30289][SQL] DSv2's partitioning should not accept nested columns URL: https://github.com/apache/spark/pull/26929#discussion_r367173077
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Implicits.scala ########## @@ -48,23 +48,27 @@ private[sql] object CatalogV2Implicits { } implicit class TransformHelper(transforms: Seq[Transform]) { - def asPartitionColumns: Seq[String] = { + def validatePartitionColumns(): Unit = { val (idTransforms, nonIdTransforms) = transforms.partition(_.isInstanceOf[IdentityTransform]) if (nonIdTransforms.nonEmpty) { throw new AnalysisException("Transforms cannot be converted to partition columns: " + - nonIdTransforms.map(_.describe).mkString(", ")) + nonIdTransforms.map(_.describe).mkString(", ")) Review comment: @rdblue do we allow to use bucket transform as a partition column? It's not allowed in `ResolveSessionCatalog.scala`, but there is a test in `DataFrameWriterV2Suite.scala` testing `test("Create: partitioned by bucket(4, id)")`. Note that in that test, there is a table property to enable `"allow-unsupported-transforms"`, what's the usecase here? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org