Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/21403#discussion_r198913668
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
---
@@ -161,33 +161,38 @@ case class Not(child: Expression)
true
""")
// scalastyle:on line.size.limit
-case class In(value: Expression, list: Seq[Expression]) extends Predicate {
+case class In(values: Seq[Expression], list: Seq[Expression]) extends
Predicate {
--- End diff --
Hive behaves as Postgres
```
0: jdbc:hive2://aaa> select 1 from (select struct(1, 'a') as col1) tab1
where col1 in ((1, 'a'));
Error: Error while compiling statement: FAILED: ParseException line 1:74
cannot recognize input near ')' '<EOF>' '<EOF>' in expression specification
(state=42000,code=40000)
0: jdbc:hive2://aaa> select 1 from (select struct(1, 'a') as col1) tab1
where (1, 'a') in ((1, 'a'));
+------+--+
| _c0 |
+------+--+
| 1 |
+------+--+
1 row selected (0.074 seconds)
```
So I do believe this is the right direction.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]