[GitHub] spark pull request: [SPARK-2218] rename Equals to EqualsTo in Spar...
Github user liancheng commented on a diff in the pull request: https://github.com/apache/spark/pull/1146#discussion_r14007759 --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveTypeCoercionSuite.scala --- @@ -28,4 +32,23 @@ class HiveTypeCoercionSuite extends HiveComparisonTest { createQueryTest(s$i + $j, sSELECT $i + $j FROM src LIMIT 1) } } + + test([SPARK-2210] boolean cast on boolean value should be removed) { +val q = select cast(cast(key=0 as boolean) as boolean) from src +val project = TestHive.hql(q).queryExecution.executedPlan.collect { case e: Project = e }.head + +// No cast expression introduced +project.transformAllExpressions { case c: Cast = + assert(false, unexpected cast + c) --- End diff -- `fail(sunexpected cast $c)` would be more concise. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] spark pull request: [SPARK-2218] rename Equals to EqualsTo in Spar...
GitHub user rxin opened a pull request: https://github.com/apache/spark/pull/1146 [SPARK-2218] rename Equals to EqualsTo in Spark SQL expressions. Due to the existence of scala.Equals, it is very error prone to name the expression Equals, especially because we use a lot of partial functions and pattern matching in the optimizer. Note that this sits on top of #1144. You can merge this pull request into a Git repository by running: $ git pull https://github.com/rxin/spark equals Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/1146.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1146 commit c4e543d9802641e4f7ddb2cc2ae08c05962a5b44 Author: Reynold Xin r...@apache.org Date: 2014-06-20T05:35:23Z [SPARK-2210] boolean cast on boolean value should be removed. commit 81148d16e97d535d9a13927c1be2a9778c6e7ae5 Author: Reynold Xin r...@apache.org Date: 2014-06-20T05:52:36Z [SPARK-2218] rename Equals to EqualsTo in Spark SQL expressions. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] spark pull request: [SPARK-2218] rename Equals to EqualsTo in Spar...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/1146#issuecomment-46646980 Merged build triggered. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] spark pull request: [SPARK-2218] rename Equals to EqualsTo in Spar...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/1146#issuecomment-46646988 Merged build started. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---