voonhous commented on code in PR #20645:
URL: https://github.com/apache/hudi/pull/20645#discussion_r4661973091


##########
hudi-trino/src/main/java/io/trino/plugin/hudi/split/HudiSplitFactory.java:
##########
@@ -82,6 +82,9 @@ private static List<HudiSplit> createHudiSplits(
         if (isCopyOnWriteOrReadOptimized(hudiTableHandle, fileSlice)) {
             // Handle MERGE_ON_READ tables to be read in read_optimized mode
             // IMPORTANT: These tables will have a COPY_ON_WRITE table type 
due to how `HudiTableTypeUtils#fromInputFormat`
+            if (fileSlice.getBaseFile().isEmpty()) {

Review Comment:
   non-blocking: With this check in place, the `COPY_ON_WRITE` + log files + no 
base file branch in `HudiPageSourceProvider#createPageSource` that returns 
`EmptyPageSource` becomes unreachable, and this resolves the TODO next to it 
about not creating the split at all. Could you drop that block here so the 
split factory is the single place this is decided, and maybe add a one-line 
comment above this check noting that read-optimized reads ignore log files?



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