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.11k stars 277 forks source link

Case statements for the RANGE type. #415

Closed vlulla closed 4 months ago

vlulla commented 4 months ago

Slight modification for the new RANGE type.

google-cla[bot] commented 4 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

afleisc commented 4 months ago

Hi @vlulla thanks for your submission !

For the CLA check - please visit https://cla.developers.google.com/. Once you've signed, follow the "New Contributors" link at the bottom of that page to update this check.

Do you mind also adding a few test cases in the test_cases file for the new type? It should follow the format for the other types and you can add yours below.

When you're finished, the bigquery-utils-push-to-pr check should succeed, and I can run the rest of the checks. Let me know if you need anything else

danieldeleo commented 4 months ago

Error thrown: Column 1 in UNION ALL has incompatible types: RANGE, RANGE, RANGE at [5:3].

You'll have to separate the test cases out so each RANGE type has its own generate_udf function

vlulla commented 4 months ago

I think my tests pass but the build step still fails. The error I get is bigquery error: Access Denied: BigQuery BigQuery: Error getting metadata for external code resource, please verify you have provided a valid path and/or that you have access to the resource: gs://bqutil-lib-test/bq_js_libs/jstat-v1.9.4.min.js How can i fix this?

danieldeleo commented 4 months ago

I'll take a look now

danieldeleo commented 4 months ago

/gcbrun