imback82 commented on code in PR #42577:
URL: https://github.com/apache/spark/pull/42577#discussion_r1383855097
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala:
##########
@@ -170,6 +170,23 @@ case class CatalogTablePartition(
}
}
+/**
+ * A container for clustering information.
+ *
+ * @param columnNames the names of the columns used for clustering.
+ */
+case class ClusterBySpec(columnNames: Seq[UnresolvedAttribute]) {
+ override def toString: String = columnNames.map(_.name).mkString(",")
+
+ lazy val toDDL: String = if (columnNames.nonEmpty) s"CLUSTER BY ($toString)"
else ""
+}
+
+object ClusterBySpec {
+ def apply(columns: String): ClusterBySpec = columns match {
Review Comment:
this is used for parsing property value back to ClusterBySpec. I renamed
this to `fromProperty`.
--
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]