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 ? I mean when do we need this since we already support 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-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