You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "eejbyfeldt (via GitHub)" <gi...@apache.org> on 2023/10/01 07:08:23 UTC

[GitHub] [spark] eejbyfeldt commented on a diff in pull request #43188: [SPARK-45386][SQL]: Fix correctness issue with persist using StorageLevel.NONE on Dataset

eejbyfeldt commented on code in PR #43188:
URL: https://github.com/apache/spark/pull/43188#discussion_r1342088619


##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -3833,7 +3833,9 @@ class Dataset[T] private[sql](
    * @since 1.6.0
    */
   def persist(newLevel: StorageLevel): this.type = {
-    sparkSession.sharedState.cacheManager.cacheQuery(this, None, newLevel)
+    if (newLevel != StorageLevel.NONE) {
+      sparkSession.sharedState.cacheManager.cacheQuery(this, None, newLevel)
+    }

Review Comment:
   Yes, that is probably better. Updated the PR.



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