{{ message }}
BigQuery: Add routines support #5591
Merged
Merged
Conversation
Contributor
Author
Codecov Report
@@ Coverage Diff @@
## master #5591 +/- ##
============================================
+ Coverage 46.71% 47.09% +0.37%
- Complexity 24647 25078 +431
============================================
Files 2351 2389 +38
Lines 256185 259732 +3547
Branches 29333 29397 +64
============================================
+ Hits 119688 122317 +2629
- Misses 127575 128454 +879
- Partials 8922 8961 +39
Continue to review full report at Codecov.
|
sduskis
approved these changes
Jul 11, 2019
Contributor
There was a problem hiding this comment.
Should this be package private? (Same with other public methods in package private classes)
Contributor
Author
There was a problem hiding this comment.
It's probably reasonable, we extend Option but don't appear to extend each of the various typed options beyond that. Filed https://github.com/googleapis/google-cloud-java/issues/5728 to followup on visibility more generally.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This adds java support for bigquery routines, which enables API access to a persistent functions and (soon) stored procedures. Routines exist inside of BigQuery datasets, just like tables and BQML models.
UDF documentation:
https://cloud.google.com/bigquery/docs/reference/standard-sql/user-defined-functions
Routines REST documentation:
https://cloud.google.com/bigquery/docs/reference/rest/v2/routines
This PR adds:
CRUD operations for manipulating Routine resources. It models the same structure used for Tables and Models. There's a RoutineId class for the qualified reference, a RoutineInfo for metadata and a Routine class for binding to the service operations like create/update/delete. Submessages like arguments (RoutineArgument) are also implemented as classes.
StandardSQLDataType,StandardSQLField,StandardSQLStructType veneers for communicating type information using standard sql typing. These are used for communicating datatype information for inputs/outputs in routines.
Augments query stats: In addition to using the API directly, you can also manipulate routines using the query language (e.g. CREATE FUNCTION ... AS ...). Statistics provided as part of the query job include the statement type, and when using appropriate DDL queries the DDL target routine.
There's some other cleanup around typos/docs, as well as filling in missing things like statements in the StatementType enum.