voonhous commented on code in PR #19687:
URL: https://github.com/apache/hudi/pull/19687#discussion_r3860843249
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/clustering/ClusteringOperator.java:
##########
@@ -353,8 +354,9 @@ private BinaryExternalSorter initSorter() {
}
private SortOperatorGen createSortOperatorGen() {
+ // Trim: the config list is user-written ("id, name"), and the column
names are looked up as given.
return new SortOperatorGen(rowType,
- conf.get(FlinkOptions.CLUSTERING_SORT_COLUMNS).split(","));
+
Arrays.stream(conf.get(FlinkOptions.CLUSTERING_SORT_COLUMNS).split(",")).map(String::trim).toArray(String[]::new));
Review Comment:
Done ee5c84f17d69. `ClusteringOperator.open` now runs
`SortUtils.validateSortableColumns` on the trimmed list against the operator's
`HoodieSchema`, so all three Flink entry points (`Pipelines`, `PipelinesV2`,
`HoodieFlinkClusteringJob`) fail at task open naming the column instead of per
record in the sorter. Pinned in
`TestClusteringOperator.testSortClusteringRejectsUnorderableColumnAtOpen` on
`ROW_TYPE_EVOLUTION_BEFORE.f_map`; PR body's clustering row now lists Flink.
--
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]