You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/11/08 16:52:31 UTC

[GitHub] [pinot] agavra commented on a diff in pull request #9760: [hotfix][multistage] fix error not returned issue

agavra commented on code in PR #9760:
URL: https://github.com/apache/pinot/pull/9760#discussion_r1016884653


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperator.java:
##########
@@ -136,10 +136,16 @@ protected TransferableBlock getNextBlock() {
           // this is blocking for 100ms and may return null
           TransferableBlock block = mailbox.receive();
           if (block != null) {
+            if (block.isErrorBlock()) {
+              _upstreamErrorBlock = TransferableBlockUtils.getErrorTransferableBlock(
+                  block.getDataBlock().getExceptions());
+              return _upstreamErrorBlock;
+            }
             if (!block.isEndOfStreamBlock()) {
               return block;
+            } else {
+              eosCount++;

Review Comment:
   I think we can actually remove eosCount - I forgot to do that when I removed the check below



##########
pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/QueryRunnerExceptionTest.java:
##########
@@ -71,11 +71,11 @@ private Object[][] provideTestSqlWithExecutionException() {
         // Function with incorrect argument signature should throw runtime exception
         new Object[]{"SELECT least(a.col2, b.col3) FROM a JOIN b ON a.col1 = b.col1",
             "ArithmeticFunctions.least(double,double) with arguments"},
-        // Function that tries to cast String to Number should throw runtime exception
-        new Object[]{"SELECT a.col2, b.col1 FROM a JOIN b ON a.col1 = b.col3", "transform function: cast"},
+        // TODO: this error is thrown but not returned through mailbox. need another test for asserting failure

Review Comment:
   I'm confused - what's the new behavior like if we don't throw an exception?



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org