-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove TableInfo hierarchy, add TableType hierarchy #600
Conversation
@@ -298,7 +305,7 @@ public boolean equals(Object obj) { | |||
* of 10 GB maximum size across all URIs. | |||
* @param schema the schema for the external data | |||
* @param format the source format of the external data | |||
* @return a builder for an ExternalDataConfiguration object given source URIs, schema and format | |||
* @return a builder for an ExternalTableDefinition object given source URIs, schema and format |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
2 BigQuery lint errors unrelated to this PR: gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/WriteChannelConfigurationTest.java:50: error: Line is longer than 100 characters (found 113). |
assertTrue(bigquery.delete(DATASET, tableName)); | ||
} | ||
|
||
@Test | ||
public void testUpdateNonExistingTable() { | ||
TableInfo tableInfo = | ||
TableInfo.of(TableId.of(DATASET, "test_update_non_existing_table"), SIMPLE_SCHEMA); | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Took a first pass, looks good! Just some minor comments from me. |
3474f3b
to
04fbf41
Compare
04fbf41
to
931b4d3
Compare
Looks good, just one new lint error: Aside from this PR, I think it'd be cool if we figured out some way to link the snippets in the READMEs to code we could test in Travis (something like the snippets here: https://cloud.google.com/appengine/docs/java/gettingstarted/ui_and_code). That way we'd always know our snippets are up to date after changes. But in lieu of that for now, it'd be good to test that the snippets work when this is about to get merged in, or when the info and functional objects get merged (if that's going to happen sooner rather than later). |
public enum Type { | ||
/** | ||
* A normal BigQuery table. Instances of {@code BaseTableDefinition} for this type are | ||
* implemented by {@link DefaultTableDefinition}. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
fixed
I totally agree but this is not easy to do. Snippets that we have now are simple end-to-end usage showcases (e.g. update a blob if it exists or create it if not). On the other hand our examples are more complex and command-line oriented to show the usage of each single functionality. Snippets could be part of IT tests but they will need changes anyway: asserts, data definitions, etc. What we could do is creating a |
Renamed to |
4ee4554
to
085903a
Compare
* used to specify only the fields of interest. {@link BaseTableInfo#tableId()} and | ||
* {@link BaseTableInfo#type()} are always returned, even if not specified. | ||
* used to specify only the fields of interest. {@link TableInfo#tableId()} and | ||
* {@link TableInfo#definition()} are always returned, even if not specified. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
@Override | ||
public String toString() { | ||
return MoreObjects.toStringHelper(this) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Looks great. Few minor comments/suggestions. |
…tion to TableDefinition
Remove TableInfo hierarchy, add TableType hierarchy
🤖 I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* chore(bazel): update protobuf to v3.21.7 PiperOrigin-RevId: 477955264 Source-Link: googleapis/googleapis@a724450 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore: fix auto-release * chore: remove codecov.yml * chore: update license headers for yaml files Source-Link: googleapis/synthtool@5b77727 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:ebc2104854c5b81c6fd72ca79400a2e20e0d510c5e0654fd1a19e5c9be160ca6 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This PR removes
TableInfo
hierarchy and replaces it with a hierarchy onTableType
. This change is needed to make functionalTable
extendTableInfo
. Notes:DefaultTableType
,ExternalTableType
orViewType
) must be provided to create aJobInfo
object.ExternalDataConfiguration
has been removed in favore ofExternalTableType
which is also used for defining external table sources inQueryJobConfiguration
.