viirya commented on a change in pull request #28662:
URL: https://github.com/apache/spark/pull/28662#discussion_r434899407



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
##########
@@ -851,12 +851,21 @@ object DDLUtils {
     table.provider.isDefined && table.provider.get.toLowerCase(Locale.ROOT) != 
HIVE_PROVIDER
   }
 
-  def readHiveTable(table: CatalogTable): HiveTableRelation = {
-    HiveTableRelation(
-      table,
-      // Hive table columns are always nullable.
-      table.dataSchema.asNullable.toAttributes,
-      table.partitionSchema.asNullable.toAttributes)
+  def readHiveTable(catalog: SessionCatalog, table: CatalogTable): 
HiveTableRelation = {

Review comment:
       I can see `readHiveTable` is used by writing path 
(`InsertIntoStatement`) too. If we just get cached plan, will it be dangerous 
if the cached plan is out-of-date and Spark writes with incorrect metadata?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to