walterddr commented on code in PR #9064:
URL: https://github.com/apache/pinot/pull/9064#discussion_r928010280


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/blocks/TransferableBlockUtils.java:
##########
@@ -19,33 +19,28 @@
 package org.apache.pinot.query.runtime.blocks;
 
 import org.apache.pinot.common.utils.DataSchema;
-import org.apache.pinot.common.utils.DataTable;
-import org.apache.pinot.core.common.datablock.BaseDataBlock;
 import org.apache.pinot.core.common.datablock.DataBlockUtils;
+import org.apache.pinot.core.common.datablock.MetadataBlock;
 
 
 public final class TransferableBlockUtils {
   private TransferableBlockUtils() {
     // do not instantiate.
   }
-  private static final TransferableBlock EOS_TRANSFERABLE_BLOCK =
-      new TransferableBlock(DataBlockUtils.getEndOfStreamDataBlock());
 
-  public static TransferableBlock getEndOfStreamTransferableBlock() {
-    return EOS_TRANSFERABLE_BLOCK;
+  public static TransferableBlock getEndOfStreamTransferableBlock(DataSchema 
dataSchema) {
+    return new TransferableBlock(DataBlockUtils.getEmptyDataBlock(dataSchema));
   }
 
   public static TransferableBlock getErrorTransferableBlock(Exception e) {
     return new TransferableBlock(DataBlockUtils.getErrorDataBlock(e));
   }
 
-  public static TransferableBlock getEmptyTransferableBlock(DataSchema 
dataSchema) {
-    return new TransferableBlock(DataBlockUtils.getEmptyDataBlock(dataSchema));
+  public static TransferableBlock repackErrorBlock(MetadataBlock 
upstreamErrorBlock) {
+    return new 
TransferableBlock(DataBlockUtils.getErrorDataBlock(upstreamErrorBlock.getExceptions()));

Review Comment:
   echo back to this point from 
https://github.com/apache/pinot/pull/9064#discussion_r928010027, we don't need 
to repackage if we don't include schema into the mix in error blocks



-- 
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

Reply via email to