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/07/22 15:37:15 UTC

[GitHub] [pinot] siddharthteotia commented on a diff in pull request #9064: [multistage] Fix data block transfer semantics and plan node data schema usage.

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


##########
pinot-core/src/main/java/org/apache/pinot/core/common/datablock/DataBlockUtils.java:
##########
@@ -55,8 +47,17 @@ public static MetadataBlock getErrorDataBlock(Exception e) {
     return errorBlock;
   }
 
-  public static MetadataBlock getEmptyDataBlock(DataSchema dataSchema) {
-    return dataSchema == null ? EOS_DATA_BLOCK : new MetadataBlock(dataSchema);
+  public static BaseDataBlock getErrorDataBlock(Map<Integer, String> exceptions) {
+    MetadataBlock errorBlock = new MetadataBlock(EMPTY_SCHEMA);
+    for (Map.Entry<Integer, String> exception : exceptions.entrySet()) {
+      errorBlock.addException(exception.getKey(), exception.getValue());
+    }
+    return errorBlock;
+  }
+
+  public static MetadataBlock getEmptyDataBlock(@Nonnull DataSchema dataSchema) {

Review Comment:
   What is the difference between this and EOS block ?



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