karuppayya commented on a change in pull request #28662: URL: https://github.com/apache/spark/pull/28662#discussion_r435019316
########## 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 tried to reuse the cache of Datasource tables for Hive tables InsertIntoStatement for Datasource tables, also fetches from the same cache. The cache invalidation have been taken care. From my reading, I didnt find any cases. Let me know if you find any cases that needs special handling. I will also check the code from this perspective again. ---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org