Jackie-Jiang commented on a change in pull request #7839: URL: https://github.com/apache/pinot/pull/7839#discussion_r765297891
########## File path: pinot-common/src/main/java/org/apache/pinot/common/utils/DataTable.java ########## @@ -35,9 +35,16 @@ void addException(ProcessingException processingException); + void addException(int exceptionCode, String exceptionMsg); + Map<Integer, String> getExceptions(); - byte[] toBytes() + default byte[] toBytes() + throws IOException { + return toBytes(false); + } + + byte[] toBytes(boolean isStrippingMetadata) Review comment: I don't see the usage of `toBytes(true)` ########## File path: pinot-core/src/main/java/org/apache/pinot/core/common/datatable/DataTableImplV2.java ########## @@ -188,10 +193,13 @@ public void addException(ProcessingException processingException) { } // Write metadata. - dataOutputStream.writeInt(dataOffset); - byte[] metadataBytes = serializeMetadata(); - dataOutputStream.writeInt(metadataBytes.length); - dataOffset += metadataBytes.length; + byte[] metadataBytes = null; Review comment: This won't work as the deserializer expect the metadata to be present even if it is empty ########## File path: pinot-core/src/main/java/org/apache/pinot/core/common/datatable/DataTableUtils.java ########## @@ -107,6 +108,34 @@ public static DataTable buildEmptyDataTable(QueryContext queryContext) } } + public static DataTable buildMetadataOnlyDataTable(DataTable origDataTable) { Review comment: I feel we might better handle this in the table table, instead of replicating all the metadata keys. Handling it this way can add maintenance overhead -- 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