voonhous commented on code in PR #19687:
URL: https://github.com/apache/hudi/pull/19687#discussion_r3850698071
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/RunClusteringProcedure.scala:
##########
@@ -233,13 +233,17 @@ class RunClusteringProcedure extends BaseProcedure
}
val tableSchemaResolver = new TableSchemaResolver(metaClient)
- val fields = tableSchemaResolver.getTableSchema(false)
- .getFields.asScala.map(_.name().toLowerCase)
- orderColumns.split(",").foreach(col => {
- if (!fields.contains(col.toLowerCase)) {
+ val tableSchema = tableSchemaResolver.getTableSchema(false)
+ val fields = tableSchema.getFields.asScala.map(_.name().toLowerCase)
+ val columns = orderColumns.split(",")
+ columns.foreach(col => {
+ if (!fields.contains(col.trim.toLowerCase)) {
Review Comment:
The procedure now normalises the list once
(`split(",").map(_.trim).mkString(",")`), validates it and stores it in
`PLAN_STRATEGY_SORT_COLUMNS`. Pinned: `order => 'id, name'` runs and the plan
carries `id,name`.
--
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]