codewithsruthi commented on PR #20365: URL: https://github.com/apache/pinot/pull/20365#issuecomment-7122459813
Hi @gortiz @Jackie-Jiang @yashmayya — tagging you for feedback when you have a chance (keeping this in draft until the current CI run on `f64f307815` finishes): - **`Sum0AggregationFunction` & Star-Tree** (@Jackie-Jiang): `SUM0` now uses a dedicated `Sum0AggregationFunction` (skipping nulls when null handling is enabled, backed by primitive double result holders initialized to `0.0`, and resolving `extractFinalResult(null)` to `0.0`), with `AggregationFunctionColumnPair.getStoredType` mapping `SUM0 -> SUM` so existing Star-Tree indexes still match. - **MSE execution & mixed-version compatibility** (@gortiz): `MultistageGroupByExecutor` (`FINAL` with `leafReturnFinalResult=true`) is aligned with `MultistageAggregationExecutor` so `null` merged results from older leaves still pass through `extractFinalResult(null)`. - **`PinotAggregateFunctionRewriteRule`** (@yashmayya): Rewritten `SUM0` (`SUMINT`/`SUMLONG`) is wrapped in `CASE(IS NOT NULL(sum), sum, 0)` only when `SUMINT`/`SUMLONG` can actually return `NULL` (empty group / `ROLLUP` / `CUBE` / `GROUPING SETS`, filtered aggregate, or nullable operand), preserving `SortAggregate` group trim on non-nullable `GROUP BY` queries. Could a maintainer also help add the `bugfix` label per the PR template? Thanks! -- 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]
