Copilot commented on code in PR #13148:
URL: https://github.com/apache/gluten/pull/13148#discussion_r4334732616
##########
gluten-arrow/src/main/java/org/apache/gluten/vectorized/ColumnarBatchOutIterator.java:
##########
@@ -153,6 +153,13 @@ protected RuntimeException translateException(Exception e)
{
return schemaEx;
}
}
+ // A GlutenException raised by native/nested code is already translated;
return it
+ // as-is rather than nesting it in another GlutenException. Keep this
after every more
+ // specific translation: a GlutenException subclass that needs its own
translation must
+ // be matched above, or this check returns it untranslated.
Review Comment:
The phrase 'Keep this after every more specific translation' is
grammatically awkward/unclear. Consider rewording to something like 'Keep this
after all more specific translations' to make the intent unambiguous.
##########
gluten-arrow/src/main/java/org/apache/gluten/vectorized/ColumnarBatchOutIterator.java:
##########
@@ -153,6 +153,13 @@ protected RuntimeException translateException(Exception e)
{
return schemaEx;
}
}
+ // A GlutenException raised by native/nested code is already translated;
return it
+ // as-is rather than nesting it in another GlutenException. Keep this
after every more
+ // specific translation: a GlutenException subclass that needs its own
translation must
+ // be matched above, or this check returns it untranslated.
+ if (e instanceof GlutenException) {
+ return (GlutenException) e;
+ }
return new GlutenException(e);
Review Comment:
This duplicates the default wrapping behavior that now exists in
`ClosableIterator.translateException` (including the new `GlutenException`
pass-through). Consider delegating at the tail to the superclass (e.g., `return
super.translateException(e);`) so the logic stays centralized and future
changes to the base translation don’t need to be replicated in each override.
--
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]