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

feat: add support for clone #2553

Merged
merged 20 commits into from Mar 10, 2023
Merged

feat: add support for clone #2553

merged 20 commits into from Mar 10, 2023

Conversation

Neenu1995
Copy link
Contributor

No description provided.

@Neenu1995 Neenu1995 requested review from a team and prash-mi March 2, 2023 19:09
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/java-bigquery API. labels Mar 2, 2023
@Neenu1995 Neenu1995 changed the title feat add cupport for clone feat: add cupport for clone Mar 2, 2023
@conventional-commit-lint-gcf
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@gcf-owl-bot gcf-owl-bot bot requested a review from a team as a code owner March 2, 2023 19:11
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Mar 2, 2023
@Neenu1995 Neenu1995 changed the title feat: add cupport for clone feat: add support for clone Mar 2, 2023
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Mar 2, 2023
@Neenu1995 Neenu1995 added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Mar 2, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 2, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 2, 2023
@Neenu1995
Copy link
Contributor Author

@shollyman PTAL.

Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! I'm always a little hesistant with extensions to TableDefinition due to it being a java-only pattern. I wonder if we should have a generic mechanism somewhere for populating the known common fields within the various table definition subclasses.


Table cloneTable = bigquery.getTable(DATASET, cloneTableName);
assertNotNull(cloneTable);
System.out.println(cloneTable.getDefinition().getType());
Copy link
Contributor

Choose a reason for hiding this comment

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

Guessing the System.out.println lines in here are stale debug statements that survived?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

@@ -85,6 +85,8 @@ public Type apply(String constant) {

public static final Type SNAPSHOT = type.createAndRegister("SNAPSHOT");

public static final Type CLONE = type.createAndRegister("CLONE");
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, here's the issue. We likely shouldn't make a new CloneTableDefinition at all. The type returned by the table metadata for a clone tables is still TABLE, not CLONE. It just has the CloneTableDefinition present.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it.. That Makes a lot more sense. By that definition shouldn't SNAPSHOT also follow a similar implementation flow? Or is that different?
Does creating a SNAPSHOT table change its definition?

@Neenu1995 Neenu1995 added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Mar 9, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 9, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 9, 2023
@Neenu1995 Neenu1995 added kokoro:force-run Add this label to force Kokoro to re-run the tests. automerge Merge the pull request once unit tests and other checks pass. labels Mar 10, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 10, 2023
@Neenu1995 Neenu1995 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 10, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 10, 2023
@Neenu1995 Neenu1995 added the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 10, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 10, 2023
@Neenu1995 Neenu1995 merged commit 2186c64 into main Mar 10, 2023
@Neenu1995 Neenu1995 deleted the table-clones branch March 10, 2023 20:43
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 10, 2023
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 googleapis/java-bigquery API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants