Skip to content
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

BigQuery: Add StandardSqlDataTypes enum to BigQuery #8782

Merged
merged 6 commits into from
Jul 30, 2019

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Jul 25, 2019

Closes #8495.

This PR adds a convenience enum with scalar SQL data types (as per issue description).

How to test

The issue is self-explanatory. Just make sure that the enum contains all the right fields that we want in it.

Update: Additionally, make sure that the docs for the new enum are in order.

@plamut plamut added the api: bigquery Issues related to the BigQuery API. label Jul 25, 2019
@plamut plamut requested a review from a team July 25, 2019 17:20
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 25, 2019
@tseaver
Copy link
Contributor

tseaver commented Jul 25, 2019

Looks like we might need to pin one of the dependencies (pyarrow?) to fix our tests.

@plamut
Copy link
Contributor Author

plamut commented Jul 25, 2019

Yeah, I've already been discussing this with @tswast, it's how pyarrow (?) handles NaN values on conversions.

bigquery/google/cloud/bigquery/enums.py Outdated Show resolved Hide resolved
bigquery/google/cloud/bigquery/enums.py Show resolved Hide resolved
bigquery/tests/unit/test_enums.py Outdated Show resolved Hide resolved
bigquery/google/cloud/bigquery/enums.py Outdated Show resolved Hide resolved
bigquery/google/cloud/bigquery/enums.py Outdated Show resolved Hide resolved
bigquery/tests/unit/test_enums.py Outdated Show resolved Hide resolved
This is a convenience enum that contains scalar SQL data types
constants (a subsset of types defined in the gapic enum generated
from the .proto definitions).
@plamut plamut added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 26, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 26, 2019
@plamut plamut requested a review from tswast July 26, 2019 20:21
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.

LGTM once the docs update is in.

@@ -130,6 +131,7 @@
"Encoding",
"QueryPriority",
"SchemaUpdateOption",
"StandardSqlDataTypes",
Copy link
Contributor

Choose a reason for hiding this comment

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

This reminds me: let's add an Enums section to the API reference docs, too.

https://github.com/googleapis/google-cloud-python/blob/master/bigquery/docs/reference.rst

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added. Also had to inject an additional header line to the new enum's docstring, because Sphinx complained about a duplicate object description (took the first line - the INT64 member - which is of course directly copied from the gapic enum).

@plamut plamut requested a review from tswast July 29, 2019 09:22
@plamut plamut merged commit 7e6f83d into googleapis:master Jul 30, 2019
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: Constants for all scalar standard SQL data types
5 participants