You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by httfighter <gi...@git.apache.org> on 2018/07/26 12:06:12 UTC
[GitHub] spark issue #21826: [SPARK-24872] Replace the symbol '||' of Or operator wit...
Github user httfighter commented on the issue:
https://github.com/apache/spark/pull/21826
I have submitted a new code. Could you help me review the code? Thank you! @HyukjinKwon @viirya @gatorsmile @rxin @hvanhovell
In Hive, "||" performs the function of STRING concat, the symbol of "Or" operator is 'or'
hive> explain select * from aa where id=1 or id=2;
and its Filter part is
predicate: ((id = 1) or (id = 2)) (type: boolean)
In Spark, "||" also performs the function of STRING concat. We can change the symbol of "Or" operator to 'or'.
spark-sql> explain extended select * from aa where id=1 or id=2;
| == Parsed Logical Plan ==
'Project [*]
+- 'Filter (('id = 1) or ('id = 2))
+- 'UnresolvedRelation `aa`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org