Conversation
|
🤖 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 -- conventional-commit-lint bot |
|
@shollyman PTAL. |
shollyman
left a comment
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
Guessing the System.out.println lines in here are stale debug statements that survived?
|
|
||
| public static final Type SNAPSHOT = type.createAndRegister("SNAPSHOT"); | ||
|
|
||
| public static final Type CLONE = type.createAndRegister("CLONE"); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
…query into table-clones
No description provided.