This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch hotfix-array-agg
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/hotfix-array-agg by this push:
     new 49c90d4030 Revert the null value handling when nullHandlingEnabled is 
false (#15382)
49c90d4030 is described below

commit 49c90d4030c209eaf279d73c6735efe8cc327485
Author: Jialiang Li <j...@linkedin.com>
AuthorDate: Thu Mar 27 09:53:55 2025 -0700

    Revert the null value handling when nullHandlingEnabled is false (#15382)
---
 .../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-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to