nsivabalan commented on a change in pull request #3977: URL: https://github.com/apache/hudi/pull/3977#discussion_r749877639
########## File path: hudi-common/src/main/java/org/apache/hudi/common/table/log/AbstractHoodieLogRecordReader.java ########## @@ -374,21 +374,23 @@ private void processQueuedBlocksForInstant(Deque<HoodieLogBlock> logBlocks, int LOG.info("Number of remaining logblocks to merge " + logBlocks.size()); // poll the element at the bottom of the stack since that's the order it was inserted HoodieLogBlock lastBlock = logBlocks.pollLast(); - switch (lastBlock.getBlockType()) { - case AVRO_DATA_BLOCK: - processDataBlock((HoodieAvroDataBlock) lastBlock, keys); - break; - case HFILE_DATA_BLOCK: - processDataBlock((HoodieHFileDataBlock) lastBlock, keys); - break; - case DELETE_BLOCK: - Arrays.stream(((HoodieDeleteBlock) lastBlock).getKeysToDelete()).forEach(this::processNextDeletedKey); - break; - case CORRUPT_BLOCK: - LOG.warn("Found a corrupt block which was not rolled back"); - break; - default: - break; + if (lastBlock != null) { Review comment: Can you help me understand why we need this change? -- 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...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org