Skip to content

Commit 25da1ca

Browse files
committed
---
yaml --- r: 1369 b: refs/heads/master c: 5f6357e h: refs/heads/master i: 1367: ca1a863
1 parent f3612fc commit 25da1ca

6 files changed

Lines changed: 24 additions & 26 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b18666b4abd2dfdab3d772ebf7c731632733c990
2+
refs/heads/master: 5f6357eaf4c35342f43add62f11c4cc384465ee6
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: d1b373c30c176edc08692348167bec3a244bb823
55
refs/heads/bigquery: 762fa5830e6c398c0396177e3e7fd243bd62cfc3

trunk/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/Field.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public Builder type(Type type) {
219219
}
220220

221221
/**
222-
* Sets the mode of the field. By default {@link Mode#NULLABLE} is used.
222+
* Sets the mode of the field. When not specified {@link Mode#NULLABLE} is used.
223223
*/
224224
public Builder mode(Mode mode) {
225225
this.mode = mode;
@@ -235,7 +235,7 @@ public Builder description(String description) {
235235
}
236236

237237
/**
238-
* Creates an {@code Field} object.
238+
* Creates a {@code Field} object.
239239
*/
240240
public Field build() {
241241
return new Field(this);

trunk/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/Schema.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ public static Builder builder() {
146146
}
147147

148148
public static Schema of(Iterable<Field> fields) {
149-
checkNotNull(fields);
150149
return builder().fields(fields).build();
151150
}
152151

trunk/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/TableInfo.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public Builder externalConfiguration(ExternalDataConfiguration externalConfigura
258258
}
259259

260260
/**
261-
* Sets a user-friendly name for the dataset.
261+
* Sets a user-friendly name for the table.
262262
*/
263263
public Builder friendlyName(String friendlyName) {
264264
this.friendlyName = firstNonNull(friendlyName, Data.<String>nullOf(String.class));
@@ -291,8 +291,8 @@ Builder numRows(Long numRows) {
291291
}
292292

293293
/**
294-
* Sets the table's schema. Providing a schema is not necessary when {@link #viewQuery} is
295-
* provided.
294+
* Sets the table's schema. Providing a schema is not necessary when {@link #viewQuery(String)}
295+
* or {@link #externalConfiguration(ExternalDataConfiguration)} are provided.
296296
*/
297297
public Builder schema(Schema schema) {
298298
this.schema = schema;
@@ -380,7 +380,7 @@ public String etag() {
380380
}
381381

382382
/**
383-
* Returns an opaque id for the dataset.
383+
* Returns an opaque id for the table.
384384
*/
385385
public String id() {
386386
return id;

trunk/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/UserDefinedFunction.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,29 @@ public enum Type {
4444
}
4545

4646
private final Type type;
47-
private final String functionDefinition;
47+
private final String content;
4848

49-
UserDefinedFunction(Type type, String functionDefinition) {
49+
UserDefinedFunction(Type type, String content) {
5050
this.type = type;
51-
this.functionDefinition = functionDefinition;
51+
this.content = content;
5252
}
5353

5454
public Type type() {
5555
return type;
5656
}
5757

5858
/**
59-
* Returns function's definition. If {@link #type()} is {@link Type#INLINE} this method returns
60-
* a code blob. If {@link #type()} is {@link Type#FROM_URI} this method returns a Google Cloud
61-
* Storage URI (e.g. gs://bucket/path).
59+
* If {@link #type()} is {@link Type#INLINE} this method returns a code blob. If {@link #type()}
60+
* is {@link Type#FROM_URI} the method returns a Google Cloud Storage URI (e.g. gs://bucket/path).
6261
*/
63-
public String functionDefinition() {
64-
return functionDefinition;
62+
public String content() {
63+
return content;
6564
}
6665

6766
/**
6867
* A Google Cloud BigQuery user-defined function, as a code blob.
6968
*/
70-
public static final class InlineFunction extends UserDefinedFunction {
69+
static final class InlineFunction extends UserDefinedFunction {
7170

7271
private static final long serialVersionUID = 1083672109192091686L;
7372

@@ -77,20 +76,20 @@ public static final class InlineFunction extends UserDefinedFunction {
7776

7877
@Override
7978
public String toString() {
80-
return MoreObjects.toStringHelper(this).add("inlineCode", functionDefinition()).toString();
79+
return MoreObjects.toStringHelper(this).add("inlineCode", content()).toString();
8180
}
8281

8382
@Override
8483
public com.google.api.services.bigquery.model.UserDefinedFunctionResource toPb() {
8584
return new com.google.api.services.bigquery.model.UserDefinedFunctionResource()
86-
.setInlineCode(functionDefinition());
85+
.setInlineCode(content());
8786
}
8887
}
8988

9089
/**
9190
* A Google Cloud BigQuery user-defined function, as an URI to Google Cloud Storage.
9291
*/
93-
public static final class UriFunction extends UserDefinedFunction {
92+
static final class UriFunction extends UserDefinedFunction {
9493

9594
private static final long serialVersionUID = 4660331691852223839L;
9695

@@ -100,19 +99,19 @@ public static final class UriFunction extends UserDefinedFunction {
10099

101100
@Override
102101
public String toString() {
103-
return MoreObjects.toStringHelper(this).add("functionUri", functionDefinition()).toString();
102+
return MoreObjects.toStringHelper(this).add("functionUri", content()).toString();
104103
}
105104

106105
@Override
107106
public com.google.api.services.bigquery.model.UserDefinedFunctionResource toPb() {
108107
return new com.google.api.services.bigquery.model.UserDefinedFunctionResource()
109-
.setResourceUri(functionDefinition());
108+
.setResourceUri(content());
110109
}
111110
}
112111

113112
@Override
114113
public int hashCode() {
115-
return Objects.hash(type, functionDefinition);
114+
return Objects.hash(type, content);
116115
}
117116

118117
@Override

trunk/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/UserDefinedFunctionTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public class UserDefinedFunctionTest {
3030

3131
@Test
3232
public void testConstructor() {
33-
assertEquals(INLINE, INLINE_FUNCTION.functionDefinition());
33+
assertEquals(INLINE, INLINE_FUNCTION.content());
3434
assertEquals(UserDefinedFunction.Type.INLINE, INLINE_FUNCTION.type());
35-
assertEquals(URI, URI_FUNCTION.functionDefinition());
35+
assertEquals(URI, URI_FUNCTION.content());
3636
assertEquals(UserDefinedFunction.Type.FROM_URI, URI_FUNCTION.type());
3737
}
3838

@@ -51,6 +51,6 @@ public void testToAndFromPb() {
5151
private void compareUserDefinedFunction(UserDefinedFunction expected, UserDefinedFunction value) {
5252
assertEquals(expected, value);
5353
assertEquals(expected.type(), value.type());
54-
assertEquals(expected.functionDefinition(), value.functionDefinition());
54+
assertEquals(expected.content(), value.content());
5555
}
5656
}

0 commit comments

Comments
 (0)