will-lauer commented on issue #145:
URL: 
https://github.com/apache/datasketches-bigquery/issues/145#issuecomment-2721709285

   For scalar functions, I strongly believe that NULL input should result in 
valid (possibly NULL) output and that we should NOT generate an error on NULL. 
There are multiple ways NULLs can creep into the system, and we should not fail 
a query if we encounter one. I believe this would match normal SQL 
expectations. So, I suggest that the various single argument scalar functions 
(such as `theta_get_estimate`) produce null when given null input. The 
multi-argument scalar functions, such as `theta_sketch_union` and 
`theta_sketch_a_not_b` are a bit more controversial. For those, while 
traditional SQL semantics would require one null input to nullify the output, I 
think we want to treat nulls the same way aggregation should - null sketches 
behave like empty sketches. So `A union NULL` produces `A` (not null). `A 
a_not_b NULL` also produces `A` (not null). Intersection is slightly weird, but 
I think `A intersect NULL` could produce the empty sketch rather than NULL and 
not confuse anyone.
   


-- 
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: dev-unsubscr...@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@datasketches.apache.org
For additional commands, e-mail: dev-h...@datasketches.apache.org

Reply via email to