You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/04 06:28:04 UTC

[GitHub] [spark] karuppayya commented on a change in pull request #28662: [SPARK-31850][SQL]Prevent DetermineTableStats from computing stats multiple times for same table

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org