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 19:29:51 UTC

(pinot) branch hotfix-array-agg updated: Revert the null value handling when nullHandlingEnabled is false (#15382)

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 <jl...@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-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org