This is an automated email from the ASF dual-hosted git repository.
gortiz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 42b63d88b2 Fix issue with group by combine operator when limit is zero
(#13555)
42b63d88b2 is described below
commit 42b63d88b26184a375f49360846507a3081a0a53
Author: Yash Mayya <[email protected]>
AuthorDate: Mon Jul 8 14:47:18 2024 +0530
Fix issue with group by combine operator when limit is zero (#13555)
---
.../main/java/org/apache/pinot/core/data/table/IndexedTable.java | 6 +++---
.../pinot/integration/tests/OfflineClusterIntegrationTest.java | 7 +++++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git
a/pinot-core/src/main/java/org/apache/pinot/core/data/table/IndexedTable.java
b/pinot-core/src/main/java/org/apache/pinot/core/data/table/IndexedTable.java
index 9e7f50ec1e..dd961a0154 100644
---
a/pinot-core/src/main/java/org/apache/pinot/core/data/table/IndexedTable.java
+++
b/pinot-core/src/main/java/org/apache/pinot/core/data/table/IndexedTable.java
@@ -71,9 +71,9 @@ public abstract class IndexedTable extends BaseTable {
int trimSize, int trimThreshold, Map<Key, Record> lookupMap) {
super(dataSchema);
- Preconditions.checkArgument(resultSize > 0, "Result size should be a
non-zero positive integer");
- Preconditions.checkArgument(trimSize > 0, "Trim size should be a non-zero
positive integer");
- Preconditions.checkArgument(trimThreshold > 0, "Trim threshold should be a
non-zero positive integer");
+ Preconditions.checkArgument(resultSize >= 0, "Result size can't be
negative");
+ Preconditions.checkArgument(trimSize >= 0, "Trim size can't be negative");
+ Preconditions.checkArgument(trimThreshold >= 0, "Trim threshold can't be
negative");
_lookupMap = lookupMap;
_hasFinalInput = hasFinalInput;
diff --git
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java
index ca1ea0b1f9..43fe8e8878 100644
---
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java
+++
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java
@@ -3472,6 +3472,13 @@ public class OfflineClusterIntegrationTest extends
BaseClusterIntegrationTestSet
testQuery("SELECT BOOL_OR(CAST(Diverted AS BOOLEAN)) FROM mytable");
}
+ @Test(dataProvider = "useBothQueryEngines")
+ public void testGroupByAggregationWithLimitZero(boolean
useMultiStageQueryEngine)
+ throws Exception {
+ setUseMultiStageQueryEngine(useMultiStageQueryEngine);
+ testQuery("SELECT Origin, SUM(ArrDelay) FROM mytable GROUP BY Origin LIMIT
0");
+ }
+
private String buildSkipIndexesOption(String columnsAndIndexes) {
return "SET " + SKIP_INDEXES + "='" + columnsAndIndexes + "'; ";
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]