danny0405 commented on code in PR #9325:
URL: https://github.com/apache/hudi/pull/9325#discussion_r1280065719


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -334,6 +334,9 @@ private List<MergeOnReadInputSplit> buildInputSplits() {
     HoodieTableFileSystemView fsView = new 
HoodieTableFileSystemView(metaClient,
         // file-slice after pending compaction-requested instant-time is also 
considered valid
         
metaClient.getCommitsAndCompactionTimeline().filterCompletedAndCompactionInstants(),
 fileStatuses);
+    if (!fsView.getLastInstant().isPresent()) {
+      throw new HoodieException("No completed instant found for table : " + 
conf.getString(FlinkOptions.TABLE_NAME));
+    }

Review Comment:
    Instead of throwing exception, can we returns a empty list so the query 
result is just empty?



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