You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2014/10/23 22:22:33 UTC

[jira] [Commented] (SPARK-4050) Caching of temporary tables with projects fail when the final query projects fewer columns

    [ https://issues.apache.org/jira/browse/SPARK-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14181890#comment-14181890 ] 

Apache Spark commented on SPARK-4050:
-------------------------------------

User 'marmbrus' has created a pull request for this issue:
https://github.com/apache/spark/pull/2912

> Caching of temporary tables with projects fail when the final query projects fewer columns
> ------------------------------------------------------------------------------------------
>
>                 Key: SPARK-4050
>                 URL: https://issues.apache.org/jira/browse/SPARK-4050
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.1.0
>            Reporter: Michael Armbrust
>            Assignee: Michael Armbrust
>            Priority: Blocker
>
> {code}
> import sqlContext._
> import org.apache.spark.sql._
> val data = sc.parallelize(1 to 100, 10).map(i => (i, i)).sortByKey()
> val data2: SchemaRDD = data.orderBy('_1.asc).select('_1)
> data2.registerTempTable("data3")
> table("data3")
> sql("cache table data3")
> {code}
> {code}
> // Note that a count(*) plan does not use the in-memory cached relation
> ​
> sql("select count(*) from data3")
> res2: org.apache.spark.sql.SchemaRDD = 
> SchemaRDD[69] at RDD at SchemaRDD.scala:104
> == Query Plan ==
> == Physical Plan ==
> Aggregate false, [], [SUM(PartialCount#17L) AS c_0#15L]
>  Exchange SinglePartition
>   Aggregate true, [], [COUNT(1) AS PartialCount#17L]
>    Project []
>     Sort [_1#2 ASC], true
>      Exchange (RangePartitioning [_1#2 ASC], 200)
>       PhysicalRDD [_1#2,_2#3], MapPartitionsRDD[38] at mapPartitions at ExistingRDD.scala:37
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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