Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.4.0
-
None
Description
“||” will perform the function of STRING concat, and it is also the symbol of the "OR" operation.
When I want use "||" as "OR" operation, I find that it perform the function of STRING concat,
spark-sql> explain extended select * from aa where id==1 || id==2;
== Parsed Logical Plan ==
'Project [*]
+- 'Filter (('id = concat(1, 'id)) = 2)
+- 'UnresolvedRelation `aa`
spark-sql> select "abc" || "DFF" ;
And the result is "abcDFF".
In predicates.scala, "||" is the symbol of "Or" operation. Could we remove it?