You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/11/18 07:43:43 UTC
[GitHub] [pinot] 61yao opened a new pull request, #9833: [multistage][testing] Add some having test case
61yao opened a new pull request, #9833:
URL: https://github.com/apache/pinot/pull/9833
Direct translation of select_having.sql from psql regress test.
The only difference is we don't support long type.
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] codecov-commenter commented on pull request #9833: [multistage][testing] Add some having test case
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #9833:
URL: https://github.com/apache/pinot/pull/9833#issuecomment-1319686120
# [Codecov](https://codecov.io/gh/apache/pinot/pull/9833?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#9833](https://codecov.io/gh/apache/pinot/pull/9833?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (926c881) into [master](https://codecov.io/gh/apache/pinot/commit/e98fa6e47f7534cd8ce6242f59247814f4dd2814?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e98fa6e) will **decrease** coverage by `2.30%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #9833 +/- ##
============================================
- Coverage 70.26% 67.96% -2.31%
- Complexity 4924 5254 +330
============================================
Files 1964 1461 -503
Lines 105055 76338 -28717
Branches 15907 12147 -3760
============================================
- Hits 73822 51886 -21936
+ Misses 26101 20779 -5322
+ Partials 5132 3673 -1459
```
| Flag | Coverage Δ | |
|---|---|---|
| integration1 | `?` | |
| integration2 | `?` | |
| unittests1 | `67.96% <ø> (+<0.01%)` | :arrow_up: |
| unittests2 | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pinot/pull/9833?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...va/org/apache/pinot/common/config/NettyConfig.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vY29uZmlnL05ldHR5Q29uZmlnLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...a/org/apache/pinot/common/metrics/MinionMeter.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9NaW5pb25NZXRlci5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...g/apache/pinot/common/metrics/ControllerMeter.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9Db250cm9sbGVyTWV0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../apache/pinot/common/metrics/BrokerQueryPhase.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9Ccm9rZXJRdWVyeVBoYXNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../apache/pinot/common/metrics/MinionQueryPhase.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9NaW5pb25RdWVyeVBoYXNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...ache/pinot/server/access/AccessControlFactory.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VydmVyL2FjY2Vzcy9BY2Nlc3NDb250cm9sRmFjdG9yeS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...he/pinot/common/messages/SegmentReloadMessage.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWVzc2FnZXMvU2VnbWVudFJlbG9hZE1lc3NhZ2UuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...he/pinot/common/messages/TableDeletionMessage.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWVzc2FnZXMvVGFibGVEZWxldGlvbk1lc3NhZ2UuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pinot/core/data/manager/realtime/TimerService.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvcmVhbHRpbWUvVGltZXJTZXJ2aWNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...not/common/exception/HttpErrorStatusException.java](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vZXhjZXB0aW9uL0h0dHBFcnJvclN0YXR1c0V4Y2VwdGlvbi5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [741 more](https://codecov.io/gh/apache/pinot/pull/9833/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] 61yao commented on a diff in pull request #9833: [multistage][testing] Add some having test case
Posted by GitBox <gi...@apache.org>.
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] agavra commented on a diff in pull request #9833: [multistage][testing] Add some having test case
Posted by GitBox <gi...@apache.org>.
agavra commented on code in PR #9833:
URL: https://github.com/apache/pinot/pull/9833#discussion_r1028435186
##########
pinot-query-runtime/src/test/resources/queries/SelectHaving.json:
##########
@@ -0,0 +1,72 @@
+{
+ "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;",
+ "ignored": true
+ },
+ {
+ "sql":"SELECT b, c FROM test_having GROUP BY b, c HAVING b = 3 ORDER BY b, c;",
+ "ignored": true
+ },
+ {
+ "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);",
+ "ignored": true
+ },
+ {
+ "sql":"SELECT c, max(a) FROM test_having GROUP BY c HAVING count(*) > 2 OR min(a) = max(a) ORDER BY c;",
+ "ignored": true
+ },
+ {
+ "sql":"SELECT min(a), max(a) FROM test_having HAVING min(a) = max(a);",
Review Comment:
+1 if it's ignored it'd be good to add a comment as to why - also i thought we do support HAVING in some situations? (I tested it in some other test, I thought)
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] walterddr merged pull request #9833: [multistage][testing] Add some having test case
Posted by GitBox <gi...@apache.org>.
walterddr merged PR #9833:
URL: https://github.com/apache/pinot/pull/9833
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] siddharthteotia commented on a diff in pull request #9833: [multistage][testing] Add some having test case
Posted by GitBox <gi...@apache.org>.
siddharthteotia commented on code in PR #9833:
URL: https://github.com/apache/pinot/pull/9833#discussion_r1027687886
##########
pinot-query-runtime/src/test/resources/queries/SelectHaving.json:
##########
@@ -0,0 +1,72 @@
+{
+ "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;",
+ "ignored": true
+ },
+ {
+ "sql":"SELECT b, c FROM test_having GROUP BY b, c HAVING b = 3 ORDER BY b, c;",
+ "ignored": true
+ },
+ {
+ "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);",
+ "ignored": true
+ },
+ {
+ "sql":"SELECT c, max(a) FROM test_having GROUP BY c HAVING count(*) > 2 OR min(a) = max(a) ORDER BY c;",
+ "ignored": true
+ },
+ {
+ "sql":"SELECT min(a), max(a) FROM test_having HAVING min(a) = max(a);",
Review Comment:
Is this for invalid / unsupported queries ?
Afaik, use of HAVING without GROUP BY is not a valid SQL syntax. I think Postgres, MySQL all support HAVING for GROUP BY aggregation queries.
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] 61yao commented on a diff in pull request #9833: [multistage][testing] Add some having test case
Posted by GitBox <gi...@apache.org>.
61yao commented on code in PR #9833:
URL: https://github.com/apache/pinot/pull/9833#discussion_r1028571555
##########
pinot-query-runtime/src/test/resources/queries/SelectHaving.json:
##########
@@ -0,0 +1,72 @@
+{
+ "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;",
+ "ignored": true
+ },
+ {
+ "sql":"SELECT b, c FROM test_having GROUP BY b, c HAVING b = 3 ORDER BY b, c;",
+ "ignored": true
+ },
+ {
+ "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);",
+ "ignored": true
+ },
+ {
+ "sql":"SELECT c, max(a) FROM test_having GROUP BY c HAVING count(*) > 2 OR min(a) = max(a) ORDER BY c;",
+ "ignored": true
+ },
+ {
+ "sql":"SELECT min(a), max(a) FROM test_having HAVING min(a) = max(a);",
Review Comment:
Yeah. Somehow I thought we don't support join and I made a mistake with the table name.
Updated the queries and comments on where we failed.
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] agavra commented on a diff in pull request #9833: [multistage][testing] Add some having test case
Posted by GitBox <gi...@apache.org>.
agavra commented on code in PR #9833:
URL: https://github.com/apache/pinot/pull/9833#discussion_r1028610894
##########
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:
this is correct behavior, right? we should add `expectedException` instead of a comment and ignore here
##########
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.",
+ "sql":"SELECT a FROM {test_having} HAVING min(a) < max(a);"
+ },
+ {
+ "ignored": true,
+ "comment": "Plan failed. Expression 'a' is not being grouped.",
+ "sql":"SELECT 1 AS one FROM {test_having} HAVING a > 1;"
+ },
+ {
+ "sql":"SELECT 1 AS one FROM {test_having} HAVING 1 > 2;"
Review Comment:
wait seriously? this succeeds but the one below fails? 🤯
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] 61yao commented on a diff in pull request #9833: [multistage][testing] Add some having test case
Posted by GitBox <gi...@apache.org>.
61yao commented on code in PR #9833:
URL: https://github.com/apache/pinot/pull/9833#discussion_r1028615746
##########
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.",
+ "sql":"SELECT a FROM {test_having} HAVING min(a) < max(a);"
+ },
+ {
+ "ignored": true,
+ "comment": "Plan failed. Expression 'a' is not being grouped.",
+ "sql":"SELECT 1 AS one FROM {test_having} HAVING a > 1;"
+ },
+ {
+ "sql":"SELECT 1 AS one FROM {test_having} HAVING 1 > 2;"
Review Comment:
yeah. it is some divided by 0 exception.
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org