You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Richard Liebscher (JIRA)" <ji...@apache.org> on 2017/03/27 09:33:41 UTC

[jira] [Created] (SPARK-20106) Nonlazy caching of DataFrame after orderBy/sortBy

Richard Liebscher created SPARK-20106:
-----------------------------------------

             Summary: Nonlazy caching of DataFrame after orderBy/sortBy
                 Key: SPARK-20106
                 URL: https://issues.apache.org/jira/browse/SPARK-20106
             Project: Spark
          Issue Type: Bug
          Components: PySpark, SQL
    Affects Versions: 2.1.0, 2.0.1
            Reporter: Richard Liebscher
            Priority: Minor


Calling {{cache}} or {{persist}} after a call to {{orderBy}} or {{sortBy}} on a DataFrame runs not lazy and creates a Spark job:

{code}spark.range(1, 1000).orderBy("id").cache(){code}

Other operations do not generate a job when cached:
{code}spark.range(1, 1000).repartition(2).cache()
spark.range(1, 1000).groupBy("id").agg(fn.min("id")).cache()
spark.range(1, 1000).cache(){code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org