Skip to content

NULL handling in sketch functions #145

@nikunjbhartia

Description

@nikunjbhartia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions