-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NULL handling in sketch functions #145
Comments
I believe Alex has already been addressing this issue, as we also ran into it and needed a solution. I'm not sure when the fix will be available, but I believe the semantics will end up being that a NULL sketch is treated the same as an non-null, empty sketch. |
This issue is slightly different. I addressed aggregate functions here: #140 |
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 |
Can we handle nulls passed as sketches in sketch functions more gracefully ?
Current error messages are confusing and unless we dig deeper into a sql query and intermediate data, its difficult to find root cause of the error.
Example:
select bqutil.datasketches.theta_sketch_a_not_b(NULL, NULL)
returns error:
BindingError: Cannot pass non-string to std::string at UDF$1(BYTES, BYTES, INT64) line 6, columns 25-26
select bqutil.datasketches.theta_sketch_union(NULL, NULL)
returns :
BindingError: Cannot pass non-string to std::string at UDF$1(BYTES, BYTES, INT64, INT64) line 12, columns 25-26
Possible handling:
Or
The text was updated successfully, but these errors were encountered: