cloud-fan commented on code in PR #42577:
URL: https://github.com/apache/spark/pull/42577#discussion_r1384591410
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala:
##########
@@ -170,6 +170,25 @@ 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(",")
+}
+
+object ClusterBySpec {
+ def fromProperty(columns: String): ClusterBySpec = columns match {
+ case "" => ClusterBySpec(Seq.empty[UnresolvedAttribute])
+ case _ =>
ClusterBySpec(columns.split(",").map(_.trim).map(UnresolvedAttribute.quotedString))
Review Comment:
hmm what if the column name contains `,`? shall we use JSON format?
--
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]