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

Michael Armbrust resolved SPARK-9444.
-------------------------------------
    Resolution: Duplicate

> RemoveEvaluationFromSort reorders sort order
> --------------------------------------------
>
>                 Key: SPARK-9444
>                 URL: https://issues.apache.org/jira/browse/SPARK-9444
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Michael Armbrust
>            Assignee: Wenchen Fan
>            Priority: Blocker
>
> {code}
> Seq((1,2,3,4)).toDF("a", "b", "c", "d").registerTempTable("test")
> scala> sqlContext.sql("SELECT * FROM test ORDER BY a + 1, b").queryExecution
> == Parsed Logical Plan ==
> 'Sort [('a + 1) ASC,'b ASC], true
>  'Project [unresolvedalias(*)]
>   'UnresolvedRelation [test], None
> == Optimized Logical Plan ==
> Project [a#4,b#5,c#6,d#7]
>  Sort [b#5 ASC,_sortCondition#9 ASC], true
>   LocalRelation [a#4,b#5,c#6,d#7,_sortCondition#9], [[1,2,3,4,2]]
> {code}
> Notice how we are now sorting by b before a + 1.



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

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

Reply via email to