leesf commented on a change in pull request #2903:
URL: https://github.com/apache/hudi/pull/2903#discussion_r624359370



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/TableSchemaResolver.java
##########
@@ -77,7 +77,9 @@ private MessageType getTableParquetSchemaFromDataFile() 
throws Exception {
           // If this is COW, get the last commit and read the schema from a 
file written in the
           // last commit
           HoodieInstant lastCommit =
-              
activeTimeline.getCommitsTimeline().filterCompletedInstants().lastInstant().orElseThrow(()
 -> new InvalidTableException(metaClient.getBasePath()));
+              
activeTimeline.getCommitsTimeline().filterCompletedInstants().lastInstant().orElseThrow(()
 -> new InvalidTableException(metaClient.getBasePath()
+                  + ". Either table does not exist or there is no valid 
commits."));
+          LOG.warn("Lst commit " + lastCommit != null ? lastCommit.toString() 
: "null");

Review comment:
        lastCommit = null should never happen?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to