fix(bigquery): Remove ReadAPI bypass in executeSelect() by whuffman36 · Pull Request #3624 · googleapis/java-bigquery · GitHub
Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.google.auto.value.AutoValue;
import com.google.cloud.StringEnumType;
import com.google.cloud.StringEnumValue;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.MoreObjects.ToStringHelper;
Expand Down Expand Up @@ -396,6 +397,7 @@ public static class QueryStatistics extends JobStatistics {
private final BiEngineStats biEngineStats;
private final Integer billingTier;
private final Boolean cacheHit;
private Boolean useReadApi;
private final String ddlOperationPerformed;
private final TableId ddlTargetTable;
private final RoutineId ddlTargetRoutine;
Expand Down Expand Up @@ -796,6 +798,7 @@ private QueryStatistics(Builder builder) {
this.biEngineStats = builder.biEngineStats;
this.billingTier = builder.billingTier;
this.cacheHit = builder.cacheHit;
this.useReadApi = false;
this.ddlOperationPerformed = builder.ddlOperationPerformed;
this.ddlTargetTable = builder.ddlTargetTable;
this.ddlTargetRoutine = builder.ddlTargetRoutine;
Expand Down Expand Up @@ -835,6 +838,18 @@ public Boolean getCacheHit() {
return cacheHit;
}

/** Returns whether the query result is read from the high throughput ReadAPI. */
@VisibleForTesting
public Boolean getUseReadApi() {
Comment thread
PhongChuong marked this conversation as resolved.
return useReadApi;
}

/** Sets internal state to reflect the use of the high throughput ReadAPI. */
@VisibleForTesting
public void setUseReadApi(Boolean useReadApi) {
this.useReadApi = useReadApi;
}

/** [BETA] For DDL queries, returns the operation applied to the DDL target table. */
public String getDdlOperationPerformed() {
return ddlOperationPerformed;
Expand Down