gemini-code-assist[bot] commented on code in PR #38026:
URL: https://github.com/apache/beam/pull/38026#discussion_r3020740982
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/testing/BigqueryClient.java:
##########
@@ -509,6 +516,12 @@ public void createNewTable(String projectId, String
datasetId, Table newTable)
lastException =
new IOException("Expected valid response from create table job,
but received null.");
}
+ } catch (GoogleJsonResponseException e) {
+ if (e.getStatusCode() == 409) {
+ LOG.info("Table {} already exists, treating as success.",
newTable.getId());
Review Comment:

The `newTable.getId()` method returns a resource ID that is typically only
populated by the BigQuery service in the response after a successful creation.
In the case of a `409 Conflict`, the `newTable` object (which represents the
request body) will likely have a `null` ID field, causing the log to display
"Table null already exists". It is better to use the `projectId`, `datasetId`,
and the table ID from the `TableReference` to provide a meaningful log message
for debugging.
```suggestion
LOG.info("Table {}:{}.{} already exists, treating as success.",
projectId, datasetId, newTable.getTableReference().getTableId());
```
--
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]