yashmayya opened a new pull request, #13555:
URL: https://github.com/apache/pinot/pull/13555
- A query like `SELECT Origin, SUM(ArrDelay) FROM mytable GROUP BY Origin
LIMIT 0` was resulting in the error:
```
QueryExecutionError:
java.lang.IllegalArgumentException: Result size can't be negative
at
com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
at
org.apache.pinot.core.data.table.IndexedTable.<init>(IndexedTable.java:74)
at
org.apache.pinot.core.data.table.ConcurrentIndexedTable.<init>(ConcurrentIndexedTable.java:42)
at
org.apache.pinot.core.data.table.ConcurrentIndexedTable.<init>(ConcurrentIndexedTable.java:37)
```
- This check was added recently in
https://github.com/apache/pinot/pull/13514 to ensure that an integer overflow
check doesn't become error prone due to negative values (also the negative
values don't make sense for result size / trim size / trim threshold).
- However, one thing that was missed is that the result size / trim size can
be 0 for aggregation queries using group by when the limit is zero -
https://github.com/apache/pinot/blob/cf1a0f6b9b44fdb567452b63a34e76ac5c635429/pinot-core/src/main/java/org/apache/pinot/core/operator/streaming/StreamingGroupByCombineOperator.java#L94
- This was surfaced by the
[testGeneratedQueries](https://github.com/apache/pinot/blob/cf1a0f6b9b44fdb567452b63a34e76ac5c635429/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTestSet.java#L480)
becoming a flaky test in recent CI runs. The test can randomly generate group
by aggregation queries with zero limits -
https://github.com/apache/pinot/blob/cf1a0f6b9b44fdb567452b63a34e76ac5c635429/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/QueryGenerator.java#L862
--
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]