GoogleCloudPlatform / bigquery-utils

Useful scripts, udfs, views, and other utilities for migration and data warehouse operations in BigQuery.
https://cloud.google.com/bigquery/
Apache License 2.0
1.07k stars 269 forks source link

Fix edge cases in JavaScript regexp_extract and regexp_extract_all UDFs #369

Closed mswapnilG closed 1 year ago

mswapnilG commented 1 year ago

Fixed following issue with cw_regexp_extract and cw_regexp_extract_all UDFS:

  1. When no match occurs then UDF returns null instead of throwing error
  2. When any of the input to UDFs is null then it returns null instead of throwing error.
danieldeleo commented 1 year ago

Thanks for the fix! Please also update the comments for the UDFs in the README.md file.

mswapnilG commented 1 year ago

@danieldeleo Done