FrankChen021 commented on PR #20782: URL: https://github.com/apache/druid/pull/20782#issuecomment-6568452063
about the null handling, my suggestion is to keep existing behaviour which accepts NULL as input. To support it, we can add `nullable()` method to `OperandType` so that callers can declare whether nullable is acceptabled. And we need test cases for both `NULL` input and `CAST(NULL as DOUBLE)` for these 6 aggregators, for example: ```java APPROX_QUANTILE(NULL, 0.5) APPROX_QUANTILE(CAST(NULL AS DOUBLE), 0.5) ``` Currently `APPROX_QUANTILE(NULL, 0.5)` returns `NaN` and `APPROX_QUANTILE_FIXED_BUCKETS(NULL, 0.5, 20, 0.0, 10.0)` returns 0.0. Whether current returnings are correct and should be aligned, is another thing that can be discussed separately. -- 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]
