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



##########
File path: 
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/DefaultSource.scala
##########
@@ -105,7 +105,9 @@ class DefaultSource extends RelationProvider
     val tableType = metaClient.getTableType
     val queryType = parameters(QUERY_TYPE_OPT_KEY)
     log.info(s"Is bootstrapped table => $isBootstrappedTable, tableType is: 
$tableType")
-
+    val schemaUtil = new TableSchemaResolver(metaClient)

Review comment:
       why call this `schemaUtil`  as opposed to `schemaResolver` ?

##########
File path: 
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/DefaultSource.scala
##########
@@ -105,7 +105,9 @@ class DefaultSource extends RelationProvider
     val tableType = metaClient.getTableType
     val queryType = parameters(QUERY_TYPE_OPT_KEY)
     log.info(s"Is bootstrapped table => $isBootstrappedTable, tableType is: 
$tableType")
-
+    val schemaUtil = new TableSchemaResolver(metaClient)
+    schemaUtil.getTableAvroSchema(false) // this will throw 
InValidTableException if there is no

Review comment:
       Verifying table existence via schema resolution, seems pretty 
un-intuitive to me. can we do it from the `metaClient`? 




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