LuciferYang commented on code in PR #13148:
URL: https://github.com/apache/gluten/pull/13148#discussion_r4142696910


##########
gluten-core/src/main/java/org/apache/gluten/iterator/ClosableIterator.java:
##########
@@ -69,6 +69,12 @@ public final void close() {
    * to translate backend-specific exceptions into Spark-compatible exceptions.
    */
   protected RuntimeException translateException(Exception e) {
+    // A GlutenException raised by a nested iterator is already translated;
+    // re-wrapping loses the flat type and prevents subclasses overriding this
+    // method from distinguishing backend errors from lifecycle errors.
+    if (e instanceof GlutenException) {
+      return (GlutenException) e;
+    }
     return new GlutenException(e);

Review Comment:
   had tests before, which were cleaned up following 
https://github.com/apache/gluten/pull/13148#discussion_r4141610068
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to