wangyum commented on a change in pull request #25306: [SPARK-28573][SQL] Convert InsertIntoTable(HiveTableRelation) to DataSource inserting for partitioned table URL: https://github.com/apache/spark/pull/25306#discussion_r311167395
########## File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala ########## @@ -197,7 +197,9 @@ private[hive] class HiveMetastoreCatalog(sparkSession: SparkSession) extends Log Some(partitionSchema)) val logicalRelation = cached.getOrElse { - val sizeInBytes = relation.stats.sizeInBytes.toLong + val defaultSizeInBytes = sparkSession.sessionState.conf.defaultSizeInBytes Review comment: Maybe we can be recalculate stats by: https://github.com/apache/spark/blob/485ae6d1818e8756a86da38d6aefc8f1dbde49c2/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/HadoopFsRelation.scala#L74-L77 This is test case: https://github.com/apache/spark/blob/485ae6d1818e8756a86da38d6aefc8f1dbde49c2/sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala#L1488-L1500 ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org