dongjoon-hyun commented on a change in pull request #24200: [SPARK-27266][SQL]
Support ANALYZE TABLE to collect tables stats for cached catalog views
URL: https://github.com/apache/spark/pull/24200#discussion_r268941265
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala
##########
@@ -200,11 +202,14 @@ case class InMemoryRelation(
}
override def computeStats(): Statistics = {
- if (cacheBuilder.sizeInBytesStats.value == 0L) {
+ if (!cacheBuilder.isCachedColumnBuffersLoaded) {
// Underlying columnar RDD hasn't been materialized, use the stats from
the plan to cache.
statsOfPlanToCache
} else {
- statsOfPlanToCache.copy(sizeInBytes =
cacheBuilder.sizeInBytesStats.value.longValue)
+ statsOfPlanToCache.copy(
+ sizeInBytes = cacheBuilder.sizeInBytesStats.value.longValue,
+ rowCount = Some(cacheBuilder.rowCountStats.value.longValue)
Review comment:
Is `rowCount` required additionally?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]