gortiz opened a new pull request, #12227:
URL: https://github.com/apache/pinot/pull/12227
This PR adds null handling support in the `mode` aggregation. Specifically,
it modifies the code to ignore null values when `mode` is evaluated with
`nullHandlingEnabled`, trying to follow the following postgres logic:
```psql
postgres=# create table myTable(myInt INT);
CREATE TABLE
postgres=# insert into myTable(myInt) VALUES (null), (1), (null);
INSERT 0 3
postgres=# SELECT mode() WITHIN GROUP (ORDER BY myInt) AS mode FROM myTable;
mode
------
1
(1 row)
```
It is recommended to review this PR assuming PR #12226 is merged, which is
equivalent to compare this PR from commit commit
f966b1b295134a08a3b201dadcedd91ca7d01c0a to head. As you can see there, this PR
also changes the test and shows that when null handling is enabled, nulls are
ignored.
--
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]