rangareddy commented on issue #17268:
URL: https://github.com/apache/hudi/issues/17268#issuecomment-5365809286

   This issue was reviewed as part of the JIRA-migrated backlog triage 
(HUDI-8169).
   
   **Findings: partially done. The bootstrap read test landed, but the code 
path the description asks about is still not exercised.**
   
   **Done** - 
`hudi-common/src/test/java/org/apache/hudi/common/table/read/TestHoodieFileGroupReaderBase.java:771`
 now has `testReadFileGroupInBootstrapMergeOnReadTable`, driven by the 
`file-group-reader/bootstrap_data.zip` fixture (`:773-775`), with bootstrap 
base-file path rewriting at `:994-999`.
   
   **Not done** - the note in the description ("Make sure that the TODO code 
path is hit for this HUDI-8169") is still outstanding. The TODO is intact at 
`:1127`:
   
   ```java
   private boolean shouldValidatePartialRead(FileSlice fileSlice, HoodieSchema 
requestedSchema) {
     if (fileSlice.getLogFiles().findAny().isPresent()) {
       return true;
     }
     if (fileSlice.getBaseFile().get().getBootstrapBaseFile().isPresent()) {
       //TODO: [HUDI-8169] this code path will not hit until we implement 
bootstrap tests
       Pair<List<HoodieSchemaField>, List<HoodieSchemaField>> dataAndMetaCols = 
FileGroupReaderSchemaHandler.getDataAndMetaCols(requestedSchema);
       return !dataAndMetaCols.getLeft().isEmpty() && 
!dataAndMetaCols.getRight().isEmpty();
     }
     return false;
   }
   ```
   
   The reason it is still unreached is visible in the method: the log-files 
check returns early, **before** the bootstrap branch. The new test builds a 
bootstrap MERGE_ON_READ table, which has log files, so it always takes the 
first branch. Reaching the bootstrap branch requires a bootstrap file slice 
with **no** log files - a COPY_ON_WRITE / base-file-only bootstrap case.
   
   That is a small, well-defined addition. Keeping this open until it lands.
   


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