ChenMichael commented on a change in pull request #34684:
URL: https://github.com/apache/spark/pull/34684#discussion_r756308545



##########
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 thought `BlockManager.getStatus` was expensive. The docs are also 
indicating that it should mainly be used for testing. Is it ok to do so in 
`isCachedColumnBuffersLoaded`? 
   My concern with only checking one partition of the RDD is that it's still 
possible to run into this problem if the partition is small and finishes soon 
before the other partitions. Then, it is still possible to run into this 
problem. 
   Alternatively, if we think one partition finishing is a good enough measure 
for the accumulators being accurate, then I can just check that the value is 
non-zero.




-- 
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: reviews-unsubscr...@spark.apache.org

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

Reply via email to