danny0405 commented on code in PR #13526:
URL: https://github.com/apache/hudi/pull/13526#discussion_r2227075274


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/HoodieDatasetBulkInsertHelper.scala:
##########
@@ -255,6 +257,16 @@ object HoodieDatasetBulkInsertHelper
     }
   }
 
+  private def getOrderingValue(nestedFieldPaths: List[NestedFieldPath], r: 
InternalRow): Comparable[_] = {
+    if (nestedFieldPaths.isEmpty) {
+      EmptyOrderingValue.getInstance();
+    } else if (nestedFieldPaths.size == 1) {
+      getNestedInternalRowValue(r, 
nestedFieldPaths.head).asInstanceOf[Comparable[_]]
+    } else {
+      new MultipleFieldsOrderingValue(nestedFieldPaths.map(_ => 
getNestedInternalRowValue(r, 
nestedFieldPaths.head).asInstanceOf[Comparable[_]]).toArray)

Review Comment:
   I tried, but got some scala typeinference issues, not very familiar with 
scala, it's great if you can help here.



-- 
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]

Reply via email to