nsivabalan commented on pull request #2903:
URL: https://github.com/apache/hudi/pull/2903#issuecomment-841553729


   > I wonder what the right behavior here should be. Should we error out or 
return an empty dataframe?
   
   If someone tries to read a hudi table from a path that does not even exist, 
we get this exception as of now. 
   ```
   scala> val tripsSnapshotDF = spark.
        |   read.
        |   format("hudi").
        |   load(basePath + "/*/*/*/*")
   org.apache.hudi.exception.TableNotFoundException: Hoodie table not found in 
path Unable to find a hudi table for the user provided paths.
     at org.apache.hudi.DataSourceUtils.getTablePath(DataSourceUtils.java:81)
     at org.apache.hudi.DefaultSource.createRelation(DefaultSource.scala:97)
     at org.apache.hudi.DefaultSource.createRelation(DefaultSource.scala:65)
     at 
org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:318)
     at 
org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:223)
     at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:211)
     at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:178)
     ... 64 elided
   ```
   So, I Guess the current fix should be fine. WDYT. 


-- 
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:
[email protected]


Reply via email to