Copilot commented on code in PR #13148:
URL: https://github.com/apache/gluten/pull/13148#discussion_r4142463463
##########
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:
The PR description says a `ClosableIteratorTranslateTest` was added, but no
such test is present in this change (and the repository has no test covering
`ClosableIterator.translateException`). Please include regression coverage for
both the raw-exception wrapping and existing-`GlutenException` pass-through,
including the `ColumnarBatchOutIterator` override, so this behavior is
protected from reintroduction.
--
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]