Copilot commented on code in PR #13148:
URL: https://github.com/apache/gluten/pull/13148#discussion_r4110736778
##########
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:
This only changes the inherited implementation. `ColumnarBatchOutIterator`
overrides `translateException` and still unconditionally returns `new
GlutenException(e)` for an existing `GlutenException`, so the Velox/Bolt
production iterators can still produce the nested wrapper this patch is
intended to eliminate. Please update that override as well (while preserving
its schema-conversion special case), or narrow the change's stated scope to the
default implementation.
--
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]