clintropolis opened a new pull request #9159: fix null handling for arithmetic 
post aggregator comparator
URL: https://github.com/apache/druid/pull/9159
 
 
   ### Description
   This PR fixes an issue when a query is ordered by an arithmetic post 
aggregator on a column that has null values, re-using the double sum comparator.
   
   The histogram extension min, max, and quantile post aggregators also had 
comparators that appeared potentially dangerous with regards to nulls, but in 
practice should not receive null values because the numbers are computed from 
either an `ApproximateHistogram` or `FixedBucketsHistogram`, so i left a 
comment and added comparator tests anyway just to increase coverage i guess? 
The added tests don't seem especially valuable, so I can optionally remove them.
   
   The javascript post agg has also been modified to use this same comparator, 
though it currently cannot receive null values because they are currently 
always coerced to a 0 (even if the js function returns null). 
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to