Skip to content

BigQuery: Add enum with SQL type names allowed to be used in SchemaField - #9040

Merged
plamut merged 2 commits into
googleapis:masterfrom
plamut:iss-7632
Aug 20, 2019
Merged

BigQuery: Add enum with SQL type names allowed to be used in SchemaField#9040
plamut merged 2 commits into
googleapis:masterfrom
plamut:iss-7632

Conversation

@plamut

Copy link
Copy Markdown
Contributor

Closes#7632.

This PR adds an enum of legacy SQL type names that can be used with in schema fields.

@tswast This enum is a bit different from the existing StandardSqlDataTypes enum which maps type names to their gapic integer codes. Let me know if I misunderstood the ticket.

How to test

Make sure all of the legacy SQL type names are included in the enum (and nothing else).

@plamutplamut added the api: bigquery Issues related to the BigQuery API. label Aug 16, 2019
@plamut
plamut requested review from a team and tswastAugust 16, 2019 12:20
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 16, 2019

@tswasttswast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Yeah, just string values for these.

@tswasttswast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Actually, looks like we're missing GEOGRAPHY.

@plamut

plamut commented Aug 18, 2019

Copy link
Copy Markdown
ContributorAuthor

@tswast GEOGRAPHY is not listed among the legacy types. Am I missing something?

Edit: The ticket description is somewhat ambiguous - I will add the string names names of the standard SQL types, too (as the issue title suggests), since that was probably the goal.

@plamutplamut changed the title BigQuery: Add enum with legacy SQL type namesBigQuery: Add enum with SQL type names allowed to be used in SchemaFieldAug 19, 2019
@plamut
plamut requested a review from tswastAugust 19, 2019 08:27
@tswast

Copy link
Copy Markdown
Contributor

Thanks. Yes, all standard SQL types names are aliases in legacy SQL, so I think that makes sense.

Filed b/139704786 to document GEOGRAPHY as not supported in legacy SQL, but still a valid type where legacy SQL names are expected in the API.

@plamut
plamut merged commit db88b8d into googleapis:masterAug 20, 2019
@plamut
plamut deleted the iss-7632 branch August 20, 2019 05:53
emar-kar pushed a commit to MaxxleLLC/google-cloud-python that referenced this pull request Sep 18, 2019
…eld (googleapis#9040)
* Add enum with legacy SQL type names
* Add standard types to enum, rename enum
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigqueryIssues related to the BigQuery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigQuery: Add enum with allowed data types for use in Schema

3 participants

@plamut@tswast@googlebot