nsivabalan commented on a change in pull request #3977:
URL: https://github.com/apache/hudi/pull/3977#discussion_r750479712



##########
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:
       hmmm. Can you update the description of the patch then, wrt this fix. 
   Also, can we add in a test for this fix. May be it could affect non-inline 
path as well. 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to