Skip to content

Commit 5268be2

Browse files
committed
---
yaml --- r: 9035 b: refs/heads/batching-expr c: 5e3f405 h: refs/heads/master i: 9033: cb72ec5 9031: cb5d6fd
1 parent 75c2760 commit 5268be2

343 files changed

Lines changed: 5363 additions & 12779 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ refs/tags/v0.27.0: 015e56421f67042037ed276353d3c0852483d570
8686
refs/tags/v0.28.0: 0d4c4daeda94e17ab70577334ae4a228b8774742
8787
refs/tags/v0.29.0: d702b33b70f2e81853a142b4158227c5a88c8781
8888
refs/tags/v0.30.0: 9ea3a32084835d0499934e7c070af9f120747e88
89-
refs/heads/batching-expr: fa853f69cdbac9fc8848db93a85c5e2a2004a5ca
89+
refs/heads/batching-expr: 5e3f40571dff14053b2bc92c52183881f106d8e7

branches/batching-expr/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ If you are using Maven, add this to your pom.xml file
5757
<dependency>
5858
<groupId>com.google.cloud</groupId>
5959
<artifactId>google-cloud</artifactId>
60-
<version>0.35.0-alpha</version>
60+
<version>0.33.0-alpha</version>
6161
</dependency>
6262
```
6363
If you are using Gradle, add this to your dependencies
@@ -275,13 +275,13 @@ Version Management
275275
276276
The easiest way to solve version conflicts is to use google-cloud's BOM. In Maven, add the following to your POM:
277277
278-
```xml
278+
```
279279
<dependencyManagement>
280280
<dependencies>
281281
<dependency>
282282
<groupId>com.google.cloud</groupId>
283283
<artifactId>google-cloud-bom</artifactId>
284-
<version>0.35.0-alpha</version>
284+
<version>0.33.0-alpha</version>
285285
<type>pom</type>
286286
<scope>import</scope>
287287
</dependency>

branches/batching-expr/google-cloud-bigquery/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-bigquery</artifactId>
25-
<version>0.35.0-beta</version>
25+
<version>0.34.0-beta</version>
2626
</dependency>
2727
```
2828
If you are using Gradle, add this to your dependencies
2929
```Groovy
30-
compile 'com.google.cloud:google-cloud-bigquery:0.35.0-beta'
30+
compile 'com.google.cloud:google-cloud-bigquery:0.34.0-beta'
3131
```
3232
If you are using SBT, add this to your dependencies
3333
```Scala
34-
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.35.0-beta"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.34.0-beta"
3535
```
3636

3737
Example Application

branches/batching-expr/google-cloud-bigquery/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>google-cloud-bigquery</artifactId>
5-
<version>0.35.1-beta-SNAPSHOT</version>
5+
<version>0.34.1-beta-SNAPSHOT</version>
66
<packaging>jar</packaging>
77
<name>Google Cloud BigQuery</name>
88
<url>https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-bigquery</url>
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-pom</artifactId>
15-
<version>0.35.1-alpha-SNAPSHOT</version>
15+
<version>0.34.1-alpha-SNAPSHOT</version>
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-bigquery</site.installationModule>

branches/batching-expr/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/DatasetInfo.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.google.common.base.Function;
2626
import com.google.common.base.MoreObjects;
2727
import com.google.common.collect.ImmutableList;
28+
import com.google.common.collect.ImmutableMap;
2829
import com.google.common.collect.Lists;
2930
import java.io.Serializable;
3031
import java.util.List;
@@ -68,7 +69,7 @@ public Dataset apply(DatasetInfo datasetInfo) {
6869
private final Long lastModified;
6970
private final String location;
7071
private final String selfLink;
71-
private final Labels labels;
72+
private final Map<String, String> labels;
7273

7374
/**
7475
* A builder for {@code DatasetInfo} objects.
@@ -156,7 +157,7 @@ static final class BuilderImpl extends Builder {
156157
private Long lastModified;
157158
private String location;
158159
private String selfLink;
159-
private Labels labels = Labels.ZERO;
160+
private Map<String, String> labels;
160161

161162
BuilderImpl() {}
162163

@@ -172,7 +173,9 @@ static final class BuilderImpl extends Builder {
172173
this.lastModified = datasetInfo.lastModified;
173174
this.location = datasetInfo.location;
174175
this.selfLink = datasetInfo.selfLink;
175-
this.labels = datasetInfo.labels;
176+
this.labels = datasetInfo.labels != null
177+
? ImmutableMap.copyOf(datasetInfo.labels)
178+
: null;
176179
}
177180

178181
BuilderImpl(com.google.api.services.bigquery.model.Dataset datasetPb) {
@@ -196,7 +199,9 @@ public Acl apply(Dataset.Access accessPb) {
196199
this.lastModified = datasetPb.getLastModifiedTime();
197200
this.location = datasetPb.getLocation();
198201
this.selfLink = datasetPb.getSelfLink();
199-
this.labels = Labels.fromPb(datasetPb.getLabels());
202+
this.labels = datasetPb.getLabels() != null
203+
? ImmutableMap.copyOf(datasetPb.getLabels())
204+
: null;
200205
}
201206

202207

@@ -272,16 +277,9 @@ Builder setSelfLink(String selfLink) {
272277
return this;
273278
}
274279

275-
/**
276-
* Sets the labels applied to this dataset.
277-
*
278-
* <p>When used with {@link BigQuery#update(DatasetInfo, DatasetOption...)}, setting {@code
279-
* labels} to {@code null} removes all labels; otherwise all keys that are mapped to {@code
280-
* null} values are removed and other keys are updated to their respective values.
281-
*/
282280
@Override
283281
public Builder setLabels(Map<String, String> labels) {
284-
this.labels = Labels.fromUser(labels);
282+
this.labels = ImmutableMap.copyOf(labels);
285283
return this;
286284
}
287285

@@ -413,7 +411,7 @@ public String getSelfLink() {
413411
* @see <a href="https://cloud.google.com/bigquery/docs/labeling-datasets">Labeling Datasets</a>
414412
*/
415413
public Map<String, String> getLabels() {
416-
return labels.userMap();
414+
return labels;
417415
}
418416

419417
/**
@@ -496,7 +494,9 @@ public Dataset.Access apply(Acl acl) {
496494
}
497495
}));
498496
}
499-
datasetPb.setLabels(labels.toPb());
497+
if (labels != null) {
498+
datasetPb.setLabels(labels);
499+
}
500500
return datasetPb;
501501
}
502502

branches/batching-expr/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Labels.java

Lines changed: 0 additions & 95 deletions
This file was deleted.

branches/batching-expr/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Table.java

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

1919
import static com.google.common.base.Preconditions.checkNotNull;
2020

21+
import com.google.api.gax.paging.Page;
2122
import com.google.cloud.bigquery.BigQuery.JobOption;
2223
import com.google.cloud.bigquery.BigQuery.TableDataListOption;
2324
import com.google.cloud.bigquery.BigQuery.TableOption;
@@ -26,7 +27,6 @@
2627
import java.io.IOException;
2728
import java.io.ObjectInputStream;
2829
import java.util.List;
29-
import java.util.Map;
3030
import java.util.Objects;
3131

3232
/**
@@ -135,12 +135,6 @@ public TableInfo.Builder setEncryptionConfiguration(EncryptionConfiguration conf
135135
return this;
136136
}
137137

138-
@Override
139-
public Builder setLabels(Map<String, String> labels) {
140-
infoBuilder.setLabels(labels);
141-
return this;
142-
}
143-
144138
@Override
145139
public Table build() {
146140
return new Table(bigquery, infoBuilder);

0 commit comments

Comments
 (0)