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

Fix: @Nullable annotations on builder methods #3222

Merged
merged 5 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Review comments
  • Loading branch information
cushon committed Apr 22, 2024
commit 3e3a94387838c279217e20238d0d8606cae9dc4c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public abstract class ConnectionSettings {
* Returns useReadAPI flag, enabled by default. Read API will be used if the underlying conditions
* are satisfied and this flag is enabled
*/
@Nullable
public abstract Boolean getUseReadAPI();
public abstract boolean getUseReadAPI();

/** Returns the synchronous response timeoutMs associated with this query */
@Nullable
Expand Down Expand Up @@ -221,7 +220,7 @@ Builder withDefaultValues() {
*
* @param useReadAPI or {@code true} for none
*/
public abstract Builder setUseReadAPI(@Nullable Boolean useReadAPI);
public abstract Builder setUseReadAPI(boolean useReadAPI);

/**
* Sets how long to wait for the query to complete, in milliseconds, before the request times
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.google.auto.value.AutoValue;
import java.io.Serializable;
import javax.annotation.Nullable;

/** Represents BigQueryStorage Read client connection information. */
@AutoValue
Expand All @@ -30,31 +31,34 @@ public abstract static class Builder {
* Sets the total row count to page row count ratio used to determine whether to us the
* BigQueryStorage Read client to fetch result sets after the first page.
*/
public abstract Builder setTotalToPageRowCountRatio(Long ratio);
public abstract Builder setTotalToPageRowCountRatio(@Nullable Long ratio);

/**
* Sets the minimum number of table rows in the query results used to determine whether to us
* the BigQueryStorage Read client to fetch result sets after the first page.
*/
public abstract Builder setMinResultSize(Long numRows);
public abstract Builder setMinResultSize(@Nullable Long numRows);

/**
* Sets the maximum number of table rows allowed in buffer before streaming them to the
* BigQueryResult.
*/
public abstract Builder setBufferSize(Long bufferSize);
public abstract Builder setBufferSize(@Nullable Long bufferSize);

/** Creates a {@code ReadClientConnectionConfiguration} object. */
public abstract ReadClientConnectionConfiguration build();
}

/** Returns the totalToPageRowCountRatio in this configuration. */
@Nullable
public abstract Long getTotalToPageRowCountRatio();

/** Returns the minResultSize in this configuration. */
@Nullable
public abstract Long getMinResultSize();

/** Returns the bufferSize in this configuration. */
@Nullable
public abstract Long getBufferSize();

public abstract Builder toBuilder();
Expand Down