cloud-fan commented on a change in pull request #34684:
URL: https://github.com/apache/spark/pull/34684#discussion_r755811926



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala
##########
@@ -259,6 +259,12 @@ case class CachedRDDBuilder(
       rowCountStats.add(batch.numRows)
       batch
     }.persist(storageLevel)

Review comment:
       I see the problem now. Ideally, we should only use the accumulators to 
get the stats if the RDD is fully cached. However, RDD cache is lazy, and I 
don't see an easy way to check the caching status.
   
   One idea is, we call `BlockManager.getStatus` to see if the first partition 
of this RDD is cached, which should probably work in most cases.
   
   That said, let's update the `isCachedColumnBuffersLoaded` method in this 
class, to really check if the cache is loaded.




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

To unsubscribe, e-mail: [email protected]

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