voonhous commented on code in PR #19161:
URL: https://github.com/apache/hudi/pull/19161#discussion_r3563597156


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/ExportInstantsProcedure.scala:
##########
@@ -88,19 +88,17 @@ class ExportInstantsProcedure extends BaseProcedure with 
ProcedureBuilder with L
 
     if (!new File(localFolder).isDirectory) throw new 
HoodieException(localFolder + " is not a valid local directory")
 
-    // The non archived instants can be listed from the Timeline. Wrap in a 
mutable list because the
-    // desc branch below reverses it in place via Collections.reverse, which 
fails on the read-only
-    // list produced by asJava over an immutable Scala collection.
-    val nonArchivedInstants: util.List[HoodieInstant] = new 
util.ArrayList[HoodieInstant](metaClient
+    // The non archived instants can be listed from the Timeline.
+    val nonArchivedInstants: util.List[HoodieInstant] = metaClient
       .getActiveTimeline
       .filterCompletedInstants.getInstants.iterator().asScala
       .filter((i: HoodieInstant) => actionSet.contains(i.getAction))
-      .toList.asJava)
+      .toList.asJava

Review Comment:
   @yihua Can you please check on this? This PR seems to be silently reverting 
the just-merged #19172 fix (`export_instants desc` breaks).



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