61yao commented on code in PR #9833:
URL: https://github.com/apache/pinot/pull/9833#discussion_r1028615441


##########
pinot-query-runtime/src/test/resources/queries/SelectHaving.json:
##########
@@ -0,0 +1,69 @@
+{
+  "select_expression_test": {
+    "tables": {
+      "test_having": {
+        "schema":[
+          {"name": "a", "type": "INT"},
+          {"name": "b", "type": "INT"},
+          {"name": "c", "type": "STRING"},
+          {"name": "d", "type": "STRING"}
+        ],
+        "inputs": [
+          [0, 1, "XXXX", "A"],
+          [1, 2, "AAAA", "b"],
+          [2, 2, "AAAA", "c"],
+          [3, 3, "BBBB", "D"],
+          [4, 3, "BBBB", "e"],
+          [5, 3, "bbbb", "F"],
+          [6, 4, "cccc", "g"],
+          [7, 4, "cccc", "h"],
+          [8, 4, "CCCC", "I"],
+          [9, 4, "CCCC", "j"]
+        ]
+      }
+    },
+    "queries": [
+      {
+        "sql":"SELECT b, c FROM {test_having} GROUP BY b, c HAVING count(*) = 
1 ORDER BY b, c;"
+      },
+      {
+        "sql":"SELECT b, c FROM {test_having} GROUP BY b, c HAVING b = 3 ORDER 
BY b, c;"
+      },
+      {
+        "sql":"SELECT lower(c), count(c) FROM {test_having} GROUP BY lower(c) 
HAVING count(*) > 2 OR min(a) = max(a) ORDER BY lower(c);"
+      },
+      {
+        "sql":"SELECT c, max(a) FROM {test_having} GROUP BY c HAVING count(*) 
> 2 OR min(a) = max(a) ORDER BY c;"
+      },
+      {
+        "sql":"SELECT min(a), max(a) FROM {test_having} HAVING min(a) = 
max(a);"
+      },
+      {
+        "sql":"SELECT min(a), max(a) FROM {test_having} HAVING min(a) < 
max(a);"
+      },
+      {
+        "ignored": true,
+        "comment": "Plan failed. Expression 'a' is not being grouped.",

Review Comment:
   Ah. good catch. I just double checked it is expected. Added 
expectedException.



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to