danielcweeks commented on code in PR #14940:
URL: https://github.com/apache/iceberg/pull/14940#discussion_r2673998679
##########
bigquery/src/main/java/org/apache/iceberg/gcp/bigquery/BigQueryTableOperations.java:
##########
@@ -48,6 +48,9 @@ final class BigQueryTableOperations extends
BaseMetastoreTableOperations {
private final FileIO fileIO;
private final TableReference tableReference;
+ /** Table loaded in doRefresh() for reuse in updateTable() to avoid
redundant API call. */
+ private volatile Table refreshedTable;
Review Comment:
Also, if we want to preserve the table, I think we should change the name to
`metastoreTable` since it technically just refers to the metastore's
representation of the table and even though the method is called refresh, it's
also used just for the initial load.
##########
bigquery/src/main/java/org/apache/iceberg/gcp/bigquery/BigQueryTableOperations.java:
##########
@@ -48,6 +48,9 @@ final class BigQueryTableOperations extends
BaseMetastoreTableOperations {
private final FileIO fileIO;
private final TableReference tableReference;
+ /** Table loaded in doRefresh() for reuse in updateTable() to avoid
redundant API call. */
+ private volatile Table refreshedTable;
Review Comment:
Do we need the full table here? It looks like what we're doing is replacing
the location check with an ETag check, which is fine, but then we just need the
ETag, correct?
##########
bigquery/src/main/java/org/apache/iceberg/gcp/bigquery/BigQueryTableOperations.java:
##########
@@ -60,9 +63,12 @@ final class BigQueryTableOperations extends
BaseMetastoreTableOperations {
public void doRefresh() {
// Must default to null.
String metadataLocation = null;
+ this.refreshedTable = null;
try {
- metadataLocation =
-
loadMetadataLocationOrThrow(client.load(tableReference).getExternalCatalogTableOptions());
+ Table table = client.load(tableReference);
Review Comment:
Agree that it's unnecessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]