Skip to content

Commit e8e9de1

Browse files
committed
docs(bigquery): add @BetaApi annotations and [Beta] Javadoc callouts
1 parent 30f6835 commit e8e9de1

3 files changed

Lines changed: 30 additions & 6 deletions

File tree

java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ArrowSerializationOptions.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.io.Serializable;
2222
import java.util.Objects;
2323

24-
/** Options specific to the Apache Arrow output format. */
24+
/** <b>[Beta]</b> Options specific to the Apache Arrow output format. */
2525
@BetaApi
2626
public final class ArrowSerializationOptions implements Serializable {
2727

@@ -35,14 +35,22 @@ private ArrowSerializationOptions(Builder builder) {
3535
this.picosTimestampPrecision = builder.picosTimestampPrecision;
3636
}
3737

38+
/**
39+
* <b>[Beta]</b> Returns the buffer compression algorithm (e.g., LZ4_FRAME, ZSTD, UNCOMPRESSED).
40+
*/
41+
@BetaApi
3842
public String getBufferCompression() {
3943
return bufferCompression;
4044
}
4145

46+
/** <b>[Beta]</b> Returns the timestamp precision for Arrow timestamp types. */
47+
@BetaApi
4248
public String getPicosTimestampPrecision() {
4349
return picosTimestampPrecision;
4450
}
4551

52+
/** <b>[Beta]</b> Returns a new builder for {@link ArrowSerializationOptions}. */
53+
@BetaApi
4654
public static Builder newBuilder() {
4755
return new Builder();
4856
}
@@ -82,22 +90,32 @@ static ArrowSerializationOptions fromPb(
8290
return ArrowSerializationOptionsConverter.fromPb(optionsPb);
8391
}
8492

93+
/** <b>[Beta]</b> Builder for {@link ArrowSerializationOptions}. */
94+
@BetaApi
8595
public static final class Builder {
8696
private String bufferCompression;
8797
private String picosTimestampPrecision;
8898

8999
private Builder() {}
90100

101+
/**
102+
* <b>[Beta]</b> Sets the buffer compression algorithm (e.g., LZ4_FRAME, ZSTD, UNCOMPRESSED).
103+
*/
104+
@BetaApi
91105
public Builder setBufferCompression(String bufferCompression) {
92106
this.bufferCompression = bufferCompression;
93107
return this;
94108
}
95109

110+
/** <b>[Beta]</b> Sets the timestamp precision for Arrow timestamp types. */
111+
@BetaApi
96112
public Builder setPicosTimestampPrecision(String picosTimestampPrecision) {
97113
this.picosTimestampPrecision = picosTimestampPrecision;
98114
return this;
99115
}
100116

117+
/** <b>[Beta]</b> Builds a new instance of {@link ArrowSerializationOptions}. */
118+
@BetaApi
101119
public ArrowSerializationOptions build() {
102120
return new ArrowSerializationOptions(this);
103121
}

java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryJobConfiguration.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static com.google.common.base.Preconditions.checkNotNull;
2121
import static com.google.common.base.Strings.isNullOrEmpty;
2222

23+
import com.google.api.core.BetaApi;
2324
import com.google.api.services.bigquery.model.JobConfigurationQuery;
2425
import com.google.api.services.bigquery.model.QueryParameter;
2526
import com.google.cloud.bigquery.JobInfo.CreateDisposition;
@@ -708,33 +709,34 @@ public Builder setReservation(String reservation) {
708709
}
709710

710711
/**
711-
* Sets the query results response format. Defaults to {@link
712+
* <b>[Beta]</b> Sets the query results response format. Defaults to {@link
712713
* QueryResultsFormat#STRUCT_ENCODING}.
713714
*
714715
* <p>When set to {@link QueryResultsFormat#ARROW}, query results are returned in binary Apache
715716
* Arrow format, utilizing gRPC Storage Read streams for subsequent pages.
716717
*
717718
* <p><b>Prerequisite:</b> Requires the BigQuery Storage Read API ({@code
718-
* bigquerystorage.googleapis.com}) to be enabled on your GCP project and your credentials to
719-
* have Storage Read permissions (e.g. {@code bigquery.readsessions.create}).
719+
* bigquerystorage.googleapis.com}) to be enabled on your GCP project.
720720
*
721721
* @param queryResultsFormat the format for query result payloads
722722
* @return the Builder
723723
*/
724+
@BetaApi
724725
public Builder setQueryResultsFormat(QueryResultsFormat queryResultsFormat) {
725726
this.queryResultsFormat = queryResultsFormat;
726727
return this;
727728
}
728729

729730
/**
730-
* Sets Arrow serialization options. Defaults to null.
731+
* <b>[Beta]</b> Sets Arrow serialization options. Defaults to null.
731732
*
732733
* <p>Note: Only applied in the request payload when {@code queryResultsFormat} is {@code
733734
* ARROW}.
734735
*
735736
* @param arrowSerializationOptions the Arrow serialization options to set
736737
* @return the Builder
737738
*/
739+
@BetaApi
738740
public Builder setArrowSerializationOptions(
739741
ArrowSerializationOptions arrowSerializationOptions) {
740742
this.arrowSerializationOptions = arrowSerializationOptions;
@@ -1015,10 +1017,14 @@ public Builder toBuilder() {
10151017
return new Builder(this);
10161018
}
10171019

1020+
/** <b>[Beta]</b> Returns the query results response format. */
1021+
@BetaApi
10181022
public QueryResultsFormat getQueryResultsFormat() {
10191023
return queryResultsFormat;
10201024
}
10211025

1026+
/** <b>[Beta]</b> Returns Arrow serialization options, or null if unset. */
1027+
@BetaApi
10221028
public ArrowSerializationOptions getArrowSerializationOptions() {
10231029
return arrowSerializationOptions;
10241030
}

java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryResultsFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import com.google.api.core.BetaApi;
2020

21-
/** The format of the query results. */
21+
/** <b>[Beta]</b> The format of the query results. */
2222
@BetaApi
2323
public enum QueryResultsFormat {
2424
/** Serialized row data in Apache Arrow format. */

0 commit comments

Comments
 (0)