siddharthteotia commented on code in PR #9817:
URL: https://github.com/apache/pinot/pull/9817#discussion_r1025484535
##########
pinot-query-runtime/src/test/resources/queries/TableExpressions.json:
##########
@@ -0,0 +1,93 @@
+{
+ "where_clause_tests": {
+ "psql": "7.2.2",
+ "tables": {
+ "tbl": {
+ "schema": [
+ {"name": "strCol", "type": "STRING"},
+ {"name": "intCol", "type": "INT"}
+ ],
+ "inputs": [
+ ["foo", 1],
+ ["bar", 2],
+ ["alice", 42],
+ ["bob", 196883]
+ ]
+ }
+ },
+ "queries": [
+ { "sql": "SELECT * FROM {tbl} WHERE intCol > 5" },
+ { "sql": "SELECT * FROM {tbl} WHERE strCol IN ('foo', 'bar')" },
+ { "sql": "SELECT * FROM {tbl} WHERE intCol IN (196883, 42)" },
+ { "sql": "SELECT * FROM {tbl} WHERE strCol IN (SELECT strCol FROM {tbl}
WHERE intCol > 100)" },
+ { "sql": "SELECT * FROM {tbl} WHERE intCol < (SELECT SUM(intCol) FROM
{tbl} AS b WHERE strCol BETWEEN 'bar' AND 'foo')" },
Review Comment:
Let's also add few other comparison operator(s) in the outer query and may
be few different aggregation functions inside IN clause subquery.
Example - find all folks with salary more than John
```
SELECT lastName, firstName, salary
FROM emp
WHERE salary > (
SELECT MAX(salary) FROM emp
WHERE firstName = 'JOHN'
)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]