You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2025/03/27 05:21:46 UTC
(pinot) 01/01: Revert the null value handling when nullHandlingEnabled is false
This is an automated email from the ASF dual-hosted git repository.
jlli pushed a commit to branch fix-null-in-agg-result-block
in repository https://gitbox.apache.org/repos/asf/pinot.git
commit d08b34a0c630e1d4ed19d6c601ce5f645f9643cc
Author: jlli_LinkedIn <jl...@linkedin.com>
AuthorDate: Wed Mar 26 22:20:19 2025 -0700
Revert the null value handling when nullHandlingEnabled is false
---
.../blocks/results/AggregationResultsBlock.java | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/operator/blocks/results/AggregationResultsBlock.java b/pinot-core/src/main/java/org/apache/pinot/core/operator/blocks/results/AggregationResultsBlock.java
index 48570ff1d0..58991924c2 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/operator/blocks/results/AggregationResultsBlock.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/operator/blocks/results/AggregationResultsBlock.java
@@ -159,17 +159,23 @@ public class AggregationResultsBlock extends BaseResultsBlock {
if (returnFinalResult) {
for (int i = 0; i < numColumns; i++) {
Object result = _aggregationFunctions[i].extractFinalResult(_results.get(i));
- assert result != null;
- setFinalResult(dataTableBuilder, columnDataTypes, i, result);
+ if (result == null) {
+ dataTableBuilder.setNull(i);
+ } else {
+ setFinalResult(dataTableBuilder, columnDataTypes, i, result);
+ }
}
} else {
for (int i = 0; i < numColumns; i++) {
Object result = _results.get(i);
- assert result != null;
- if (columnDataTypes[i] == ColumnDataType.OBJECT) {
- dataTableBuilder.setColumn(i, _aggregationFunctions[i].serializeIntermediateResult(result));
+ if (result == null) {
+ dataTableBuilder.setNull(i);
} else {
- setIntermediateResult(dataTableBuilder, columnDataTypes, i, result);
+ if (columnDataTypes[i] == ColumnDataType.OBJECT) {
+ dataTableBuilder.setColumn(i, _aggregationFunctions[i].serializeIntermediateResult(result));
+ } else {
+ setIntermediateResult(dataTableBuilder, columnDataTypes, i, result);
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org