paul-rogers commented on a change in pull request #1975: DRILL-7576: Fail fast 
for operator errors
URL: https://github.com/apache/drill/pull/1975#discussion_r377999381
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggBatch.java
 ##########
 @@ -340,16 +340,12 @@ public IterOutcome innerNext() {
       }
 
     case UPDATE_AGGREGATOR:
-      context.getExecutorState().fail(UserException.unsupportedError()
+      throw UserException.unsupportedError()
           .message(SchemaChangeException.schemaChanged(
               "Hash aggregate does not support schema change",
               incomingSchema,
               incoming.getSchema()).getMessage())
-          .build(logger));
-      close();
-      killIncoming(false);
-      firstBatch = false;
-      return IterOutcome.STOP;
+          .build(logger);
 
 Review comment:
   We are throwing an exception. In all such cases, the first thing the 
fragment executor does is close all the active operators. So, no need for us to 
tell upstream that we're failing, or for us to close here. This is, in fact, an 
ambiguity that has lead to several bugs when we've closed things twice in a way 
that triggers errors.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to