Skip to content

Conversation

@plamut
Copy link
Contributor

@plamut plamut commented Aug 16, 2019

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).

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

@tswast tswast left a comment

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.

Copy link
Contributor

@tswast tswast left a comment

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
Copy link
Contributor Author

plamut commented Aug 18, 2019

@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.

@plamut plamut changed the title BigQuery: Add enum with legacy SQL type names BigQuery: Add enum with SQL type names allowed to be used in SchemaField Aug 19, 2019
@plamut plamut requested a review from tswast August 19, 2019 08:27
@tswast
Copy link
Contributor

tswast commented Aug 19, 2019

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:master Aug 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API. cla: yes This 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