@@ -75,6 +75,8 @@ public final class QueryJobConfiguration extends JobConfiguration {
7575 private final Long maxResults ;
7676 private final JobCreationMode jobCreationMode ;
7777 private final String reservation ;
78+ private final QueryResultsFormat queryResultsFormat ;
79+ private final ArrowSerializationOptions arrowSerializationOptions ;
7880
7981 /**
8082 * Priority levels for a query. If not specified the priority is assumed to be {@link
@@ -144,6 +146,8 @@ public static final class Builder
144146 private Long maxResults ;
145147 private JobCreationMode jobCreationMode ;
146148 private String reservation ;
149+ private QueryResultsFormat queryResultsFormat ;
150+ private ArrowSerializationOptions arrowSerializationOptions ;
147151
148152 private Builder () {
149153 super (Type .QUERY );
@@ -181,6 +185,8 @@ private Builder(QueryJobConfiguration jobConfiguration) {
181185 this .maxResults = jobConfiguration .maxResults ;
182186 this .jobCreationMode = jobConfiguration .jobCreationMode ;
183187 this .reservation = jobConfiguration .reservation ;
188+ this .queryResultsFormat = jobConfiguration .queryResultsFormat ;
189+ this .arrowSerializationOptions = jobConfiguration .arrowSerializationOptions ;
184190 }
185191
186192 private Builder (com .google .api .services .bigquery .model .JobConfiguration configurationPb ) {
@@ -701,6 +707,17 @@ public Builder setReservation(String reservation) {
701707 return this ;
702708 }
703709
710+ public Builder setQueryResultsFormat (QueryResultsFormat queryResultsFormat ) {
711+ this .queryResultsFormat = queryResultsFormat ;
712+ return this ;
713+ }
714+
715+ public Builder setArrowSerializationOptions (
716+ ArrowSerializationOptions arrowSerializationOptions ) {
717+ this .arrowSerializationOptions = arrowSerializationOptions ;
718+ return this ;
719+ }
720+
704721 public QueryJobConfiguration build () {
705722 return new QueryJobConfiguration (this );
706723 }
@@ -747,6 +764,8 @@ private QueryJobConfiguration(Builder builder) {
747764 this .maxResults = builder .maxResults ;
748765 this .jobCreationMode = builder .jobCreationMode ;
749766 this .reservation = builder .reservation ;
767+ this .queryResultsFormat = builder .queryResultsFormat ;
768+ this .arrowSerializationOptions = builder .arrowSerializationOptions ;
750769 }
751770
752771 /**
@@ -973,6 +992,14 @@ public Builder toBuilder() {
973992 return new Builder (this );
974993 }
975994
995+ public QueryResultsFormat getQueryResultsFormat () {
996+ return queryResultsFormat ;
997+ }
998+
999+ public ArrowSerializationOptions getArrowSerializationOptions () {
1000+ return arrowSerializationOptions ;
1001+ }
1002+
9761003 @ Override
9771004 ToStringHelper toStringHelper () {
9781005 return super .toStringHelper ()
@@ -1004,13 +1031,23 @@ ToStringHelper toStringHelper() {
10041031 .add ("rangePartitioning" , rangePartitioning )
10051032 .add ("connectionProperties" , connectionProperties )
10061033 .add ("jobCreationMode" , jobCreationMode )
1007- .add ("reservation" , reservation );
1034+ .add ("reservation" , reservation )
1035+ .add ("queryResultsFormat" , queryResultsFormat )
1036+ .add ("arrowSerializationOptions" , arrowSerializationOptions );
10081037 }
10091038
10101039 @ Override
10111040 public boolean equals (Object obj ) {
1012- return obj == this
1013- || obj instanceof QueryJobConfiguration && baseEquals ((QueryJobConfiguration ) obj );
1041+ if (obj == this ) {
1042+ return true ;
1043+ }
1044+ if (obj == null || !(obj instanceof QueryJobConfiguration )) {
1045+ return false ;
1046+ }
1047+ QueryJobConfiguration other = (QueryJobConfiguration ) obj ;
1048+ return baseEquals (other )
1049+ && Objects .equals (queryResultsFormat , other .queryResultsFormat )
1050+ && Objects .equals (arrowSerializationOptions , other .arrowSerializationOptions );
10141051 }
10151052
10161053 @ Override
@@ -1043,7 +1080,9 @@ public int hashCode() {
10431080 labels ,
10441081 rangePartitioning ,
10451082 connectionProperties ,
1046- reservation );
1083+ reservation ,
1084+ queryResultsFormat ,
1085+ arrowSerializationOptions );
10471086 }
10481087
10491088 @ Override
0 commit comments