You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "doki23 (via GitHub)" <gi...@apache.org> on 2024/03/17 12:41:15 UTC

Re: [PR] [SPARK-46992]Fix cache consistency [spark]

doki23 commented on code in PR #45181:
URL: https://github.com/apache/spark/pull/45181#discussion_r1527498760


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala:
##########
@@ -369,6 +375,20 @@ class QueryExecution(
     Utils.redact(sparkSession.sessionState.conf.stringRedactionPattern, message)
   }
 
+  /**
+   * This method performs a pre-order traversal and return a boolean Array
+   * representing whether some nodes of the logical tree are persisted.
+   */
+  def computeCacheStateSignature(): Array[Boolean] = {

Review Comment:
   `BitSet` requires a `numBits` parameter. I cannot know the number of children in advance. Although current implementation is less efficient, it's still acceptable.



-- 
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-unsubscribe@spark.apache.org

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