nsivabalan commented on code in PR #5945:
URL: https://github.com/apache/hudi/pull/5945#discussion_r905314925


##########
hudi-common/src/main/java/org/apache/hudi/BaseHoodieTableFileIndex.java:
##########
@@ -279,7 +279,8 @@ private void doRefresh() {
 
     validate(activeTimeline, queryInstant);
 
-    if (tableType.equals(HoodieTableType.MERGE_ON_READ) && 
queryType.equals(HoodieTableQueryType.SNAPSHOT)) {
+    if (tableType.equals(HoodieTableType.MERGE_ON_READ) && 
queryType.equals(HoodieTableQueryType.SNAPSHOT)
+        || (queryType.equals(HoodieTableQueryType.READ_OPTIMIZED))) {

Review Comment:
   within the "if" block, we call 
`fileSystemView.getLatestMergedFileSlicesBeforeOrOn` which is applicable only 
for SNAPSHOT. for read optimized, it may not make sense since we are interested 
only in base files. "else" block rightly uses 
`fileSystemView.getLatestFileSlicesBeforeOrOn`.
   can you help understand the issue you are facing. 



##########
hudi-common/src/main/java/org/apache/hudi/BaseHoodieTableFileIndex.java:
##########
@@ -279,7 +279,8 @@ private void doRefresh() {
 
     validate(activeTimeline, queryInstant);
 
-    if (tableType.equals(HoodieTableType.MERGE_ON_READ) && 
queryType.equals(HoodieTableQueryType.SNAPSHOT)) {
+    if (tableType.equals(HoodieTableType.MERGE_ON_READ) && 
queryType.equals(HoodieTableQueryType.SNAPSHOT)
+        || (queryType.equals(HoodieTableQueryType.READ_OPTIMIZED))) {

Review Comment:
   also, can we write a test case to reproduce the bug and showcase that w/o 
the fix it fails and w/ the fix, it succeeds



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