wombatu-kun commented on code in PR #20368:
URL: https://github.com/apache/hudi/pull/20368#discussion_r4314124160
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestMORDataSource.scala:
##########
@@ -2594,6 +2594,37 @@ class TestMORDataSource extends
HoodieSparkClientTestBase with SparkDatasetMixin
def testNestedFieldPartition(): Unit = {
TestCOWDataSource.runNestedFieldPartitionTest(spark, basePath, storage,
"MOR")
}
+
+ @ParameterizedTest
Review Comment:
Done b5b24b74103d. The leading zero makes `"050"` sort before `"100"` as a
string too, and a comment now says so.
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/common/model/HoodieSparkRecord.java:
##########
@@ -389,8 +389,10 @@ public Comparable<?> getOrderingValueAsJava(HoodieSchema
recordSchema, Propertie
if (orderingFields == null) {
return OrderingValues.getDefault();
} else {
+ StructType structType =
HoodieInternalRowUtils.getCachedSchema(recordSchema);
return OrderingValues.create(orderingFields, field -> {
- if (recordSchema.getField(field).isEmpty()) {
+ // Ordering fields can be nested, so resolve them by path as
doGetOrderingValue does.
+ if (HoodieInternalRowUtils.getCachedPosList(structType,
field).isEmpty()) {
Review Comment:
Done b5b24b74103d
--
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]