FrankChen021 commented on PR #20782:
URL: https://github.com/apache/druid/pull/20782#issuecomment-6569652811

   > Thanks. Before I change this, could you share a bit more about why? I 
brought this up in [#18010 
(comment)](https://github.com/apache/druid/issues/18010#issuecomment-6483925270)
 (that `APPROX_QUANTILE(NULL, 0.5)` would start failing with "Illegal use of 
'NULL'"), and I took your reply as OK with that, so I kept it. Maybe I misread 
it.
   > 
   > Only a bare `NULL` is rejected on this branch. 
`APPROX_QUANTILE_DS(CAST(NULL AS DOUBLE), 0.5)` still plans fine.
   > 
   > I don't mind adding `nullable()` if you'd rather keep the old behavior, I 
just want to check I'm not missing a case where someone depends on it. If we go 
that way, I'll add `NULL` and `CAST(NULL AS DOUBLE)` tests for all six 
aggregators. The NaN vs 0.0 difference can be a separate issue.
   
   The reason is I found different aggregators have different implementation on 
how to handle the `NULL` input. And existing spectator DOES have a test case 
against `NULL` input and expect NULL returning ( see 
`testSpectatorFunctionsOnNullHistogram`). That one is similar to above quantile 
functions you change in this PR.
   
   Although we don't have a general rule about handling of NULL, it's hard to 
tell which behaviour is good/right/better, I think it's better for us keep 
existing behaviour in this RP and discuss the returning 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]

Reply via email to