apache / apache/datasketches-bigquery

NULL handling in sketch functions

Open
#145 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
21
Forks
8
PR merge metrics
No merged PRs in 30d

Description

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:
- Can nulls be treated as a no-op and we return null ?
Or
- Return more meaningful error message

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.