walterddr commented on code in PR #9064: URL: https://github.com/apache/pinot/pull/9064#discussion_r928010027
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/blocks/TransferableBlock.java: ########## @@ -97,10 +122,38 @@ public BaseDataBlock getDataBlock() { return _dataBlock; } + /** + * Return the type of block (one of ROW, COLUMNAR, or METADATA). + * + * @return return type of block + */ public BaseDataBlock.Type getType() { return _type; } + /** + * Return whether a transferable block is at the end of a stream. + * + * <p>End of stream is different from data block with 0-rows. which can indicate that one partition of the execution + * returns no rows. but that doesn't mean the rest of the partitions are also finished. + * <p>When an exception is caught within a stream, no matter how many outstanding data is pending to be received, + * it is considered end of stream because the exception should bubble up immediately. + * + * @return whether this block is the end of stream. + */ + public boolean isEndOfStreamBlock() { + return _isErrorBlock || _type == BaseDataBlock.Type.METADATA; Review Comment: oh i remembered why this was done like this --> this was for leaf node. since the data block was a row-based data block with 0-rows, and an exception map not empty.. so I had to make the change. now that I think of it I should rewrap and return at this stage. so that I don't have to rewrap again in the future. -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org