[ 
https://issues.apache.org/jira/browse/SPARK-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Armbrust resolved SPARK-4050.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.2.0

Issue resolved by pull request 2912
[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
>             Fix For: 1.2.0
>
>
> {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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to