-
-
Notifications
You must be signed in to change notification settings - Fork 150
Import newest discovery document from Google #424
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
Conversation
- curl -s https://bigquery.googleapis.com/discovery/v1/apis/bigquery/v2/rest | \ jq -S >server/resources/discovery.json - Emptied some fields to minimize the diff: basePath, baseUrl, batchPath, mtlsRootUrl, and servicePath
|
This looks good to me! @goccy should we merge it? @goccy and I have been discussing moving this repository to a joint organization so that it can become more active. Hopefully that'll happen soon! If not, you're welcome to open this against our fork which has many improvements made to it at Recidiviz/bigquery-emulator |
|
Thanks, @ohaibbq! I've got a bunch of PRs that I'd like to get merged 😄 We're becoming fairly heavy users of this so it would be great to keep in sync with upstream. |
|
Thank you for your contribution ! LGTM 👍 |
|
Thanks! We also rely on it very heavily, we have a suite nearly 1,500 tests for thousands of our tables/views. Here's the list of improvements in our fork, which will hopefully be consolidated once we get the organization situation worked out. BigQuery Emulator and ZetaSQL Forks: Change SummaryThis document summarizes all changes made in Recidiviz's forks of the BigQuery Emulator and go-zetasqlite libraries. Recidiviz/bigquery-emulatorPerformance ImprovementsPR #32: Detect view schema from changed catalog (Sep 2025)
PR #29: Build and push arm64 images (Aug 2025)
PR #12: Refactor API data-access pattern (Apr 2024)
PR #11: Return immediately from Job.wait() (Apr 2024)
PR #10: Use in-memory storage (Apr 2024)
PR #9: Add --data-from-json option (Apr 2024)
Feature AdditionsPR #28: Migrate to modernc.org/sqlite + Go 1.24 (May 2025)
PR #27: Support WRITE_TRUNCATE WriteDisposition (Mar 2025) PR #22: Update go-zetasqlite for row access policy (Jan 2025)
PR #21: Allow DROP VIEW and DROP MATERIALIZED VIEW (Nov 2024)
PR #20: Properly unmarshal JSON values (Jul 2024)
PR #8: Serve HTTPS connections to enable JDBC (Mar 2024)
Bug FixesPR #26: Fix view query end cutset (Feb 2025) PR #25: Hydrate Table.Schema in tablesInsertRequest.Handle (Feb 2025)
PR #18: Return duplicate error for duplicate dataset (Jun 2024)
PR #17: Return invalidQuery for invalid view queries (May 2024) PR #16: Return invalidQuery to avoid retry (May 2024)
PR #15: Fix Table PATCH response (May 2024)
PR #14: Fix job materialization (Apr 2024)
PR #13: Fix view creation with semicolon (Apr 2024)
PR #7: Handle formatting timestamps when inserting (Feb 2024)
PR #6: Fix Too many SQL variables error (Feb 2024)
PR #5: Increase request timeout (Feb 2024)
PR #4: Respect maxResults parameter (Jan 2024)
Recidiviz/go-zetasqliteMajor Performance ImprovementsPR #54: Delegate comparison operators to SQLite (Sep 2025)
PR #53: Rewrite formatter to use object-based SQL generation (Sep 2025)
PR #50: Index zetasqlite_catalog by update time (May 2025)
PR #44: Use WITHOUT ROWID table clustering (Apr 2024)
PR #43: Allow disabling query formatting; support named parameters (Apr 2024)
PR #32: Materialize CTEs for faster execution (Mar 2024) PR #20: Rewrite window function implementation (Feb 2024)
Feature AdditionsPR #51: Migrate to modernc.org/sqlite (May 2025)
PR #49: Upgrade to Go 1.24 (May 2025) PR #48: Add no-op mechanism for unsupported statements (Jan 2025)
PR #45: Support CONTAINS_SUBSTR function (Apr 2024)
PR #42: Support LOGICAL_OR and LOGICAL_AND windows (Apr 2024) PR #41: Fix QueryStmtNode output; wrap union statements (Apr 2024) PR #40: Support sql.Driver's PrepareContext interface (Apr 2024) PR #38: Enable QUALIFY without GROUP BY/WHERE/HAVING (Mar 2024) PR #37: Support UNNEST WITH OFFSET (Mar 2024) PR #36: Support PIVOT/UNPIVOT (Mar 2024) PR #1: Suppress errors when SQL functions have SAFE. prefix (Apr 2023)
Date/Time ImprovementsPR #52: Fix DATE_DIFF handling of diff remainder (May 2025)
PR #39: Handle QUARTER, WEEK(DAY), ISOWEEK (Apr 2024)
PR #35: Parse julian day of year (Mar 2024)
PR #24: Fix %p 12pm case (Feb 2024) PR #23: Capture all whitespace in date parser (Feb 2024)
PR #19: Implement %p, improve token composition (Feb 2024)
PR #11: Base date in parsing is start of unix time (Jan 2024)
PR #8: Implement %y year without century parser (Jan 2024)
PR #7: Use microsecond precision for timestamps (Jan 2024)
PR #4: Output correct date/time formats when casting to strings (May 2023)
Bug Fixes - String FunctionsPR #47: Trim all whitespace by default, not just spaces (Jun 2024)
PR #30: Do not cast integer/float-like strings to datetime (Feb 2024)
PR #29: Use direct string value from ZetaSQL (Feb 2024)
PR #16: Cast to INT64 should use base-10 parsing (Feb 2024)
PR #14: LIKE properly escapes regexp-characters (Feb 2024)
PR #5: Harden string functions when NULL is passed (May 2023)
Bug Fixes - OtherPR #46: Fix control flow execution of IF(), IFNULL() (Jun 2024)
PR #34: Don't crash on nil in LOGICAL_OR and LOGICAL_AND (Mar 2024)
PR #33: Ignore nulls when counting window values (Mar 2024) PR #31: Return nil for null values in IN(), BETWEEN(), LIKE() (Mar 2024)
PR #28: Use value comparators for LEAST, GREATEST, BETWEEN (Feb 2024)
PR #27: Handle null ARRAY fields (Feb 2024)
PR #26: Support LEFT OUTER/INNER JOIN modes for arrays (Feb 2024)
PR #25: Correctly handle ordering multiple fields in aggregates (Feb 2024)
PR #22: Fix IN() operator return when left-hand side is null (Feb 2024)
PR #21: Fix prepared insert statements (Feb 2024)
PR #18: Fix NULLIF panic on null (Feb 2024)
PR #17: Reset format context between analytic function groups (Feb 2024)
PR #15: Fix syntax error with subselects or QUALIFY (Feb 2024)
PR #13: Fix ordinal boundary indexing for arrays (Feb 2024)
PR #12: Properly return nil for STRING_AGG (Feb 2024)
PR #10: Handle multiple sort expressions in windowing (Jan 2024)
PR #9: Handle null values in partitions (Jan 2024)
Testing ImprovementsPR #6: Use UTC timezone in query_test.go (Jan 2024)
SummaryRecidiviz/bigquery-emulator: 34 PRs
Recidiviz/go-zetasqlite: 54 PRs
|
|
@ohaibbq is there any docker image publicly available to try your version? It looks amazing. |
I have seen that one, but is it as simple as one docker pull (or entry in docker-compose) away from testing? |
Yes- it can be a drop-in replacement, though the upstream version it is based off of is v0.4.4 not latest v0.6.6 |
|
Incredible work @ohaibbq and team! Our list of fixes is quite a bit more more modest by comparison
I would like to figure out how to add support for |
* Run discovery.json through jq -S * Import newest discovery document from Google - curl -s https://bigquery.googleapis.com/discovery/v1/apis/bigquery/v2/rest | \ jq -S >server/resources/discovery.json - Emptied some fields to minimize the diff: basePath, baseUrl, batchPath, mtlsRootUrl, and servicePath
jq -S >server/resources/discovery.json
and servicePath