Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
81744f7
Create packages for bigquery and outline spi layer
mziccard Nov 5, 2015
eeae71f
Rename Bigquery to BigQuery across bigquery module
mziccard Nov 9, 2015
13e976a
Merge pull request #326 from mziccard/bigquery
aozarov Nov 12, 2015
381d056
Add BigQueryRpc default implementation
mziccard Nov 12, 2015
e3a99c2
Add error codes, handle NOT_FOUND in BigQuery RPC, add javadoc
mziccard Nov 19, 2015
12aa555
Fix empty list bug, handle job state and error in listJobs
mziccard Nov 19, 2015
120fe12
Remove quota options, always use options.projectId()
mziccard Nov 24, 2015
762fa58
Merge pull request #367 from mziccard/bigquery
aozarov Nov 24, 2015
e4a5e55
Add DatasetInfo, DatasetId, TableId and Acl models and tests
mziccard Nov 24, 2015
3fc189b
Better javadoc, move static imports
mziccard Nov 26, 2015
dea8eff
Add SerializationTest class
mziccard Nov 26, 2015
3f0d511
Handle null role in Acl.fromPb, add test
mziccard Nov 27, 2015
4f05b98
Merge pull request #417 from mziccard/bigquery
aozarov Nov 29, 2015
8d2249e
Add TableInfo, CsvOptions, ExternalDataConfiguration and UserDefinedF…
mziccard Nov 30, 2015
b18666b
Refactor TableInfo and related classes
mziccard Dec 1, 2015
5f6357e
Minor javadoc updates, rename functionDefinition to content
mziccard Dec 2, 2015
79001cf
Replace format with FormatOptions in ExternalDataConfiguration
mziccard Dec 2, 2015
f84a3b1
Handle unset of Field's mode and description
mziccard Dec 3, 2015
bd58ee5
Make FormatOptions.csv return CsvOptions, remove getters from Externa…
mziccard Dec 3, 2015
66972df
Add TableType hierarcy to wrap different types of tables
mziccard Dec 3, 2015
ae2a484
Remove TableType, add TableInfo, ViewInfo ExternalTableInfo hierarcy
mziccard Dec 4, 2015
338ede1
Fix mode's nullability by internally storing a string
mziccard Dec 4, 2015
9df4005
Make BaseTableInfo abstract and other minor fixes
mziccard Dec 4, 2015
12185e8
Merge pull request #423 from mziccard/bigquery
aozarov Dec 4, 2015
722e4a7
Add JobInfo hierarcy and related classes
mziccard Dec 9, 2015
a88e0da
Merge pull request #442 from mziccard/bigquery
mziccard Dec 9, 2015
27f4d0d
Add InsertAllRequest and InsertAllResponse. Add model classes for tab…
mziccard Dec 9, 2015
1674c9c
Document ClassCastException in FieldValue
mziccard Dec 10, 2015
d2f0a82
Minor changes to FieldValue and InsertAllRequest
mziccard Dec 11, 2015
50d381f
Remove TableRow class
mziccard Dec 11, 2015
aacc383
Fix javadoc error, add checkNotNull to FieldValue getters
mziccard Dec 11, 2015
7dfca8e
Merge pull request #443 from mziccard/bigquery
aozarov Dec 11, 2015
20d4841
Add query request and query response classes and tests
mziccard Dec 11, 2015
9756dff
Refactor QueryRequest and QueryResponse
mziccard Dec 14, 2015
e16c027
Add QueryResult class and tests
mziccard Dec 14, 2015
c6e53c8
Rename QueryResponse.job to jobId, better javadoc, no errors as empty…
mziccard Dec 14, 2015
36c7406
Merge pull request #452 from mziccard/bigquery
aozarov Dec 14, 2015
3b70b20
Refactor BigQueryRpc and DefaultBigQueryRpc
mziccard Dec 14, 2015
0f765b7
Merge pull request #453 from mziccard/bigquery
aozarov Dec 14, 2015
e1dc3af
Add BigQuery service implementation
mziccard Dec 15, 2015
d676636
Fix minor errors
mziccard Dec 16, 2015
814264a
Merge pull request #454 from mziccard/bigquery
ajkannan Dec 17, 2015
e91f47b
Make checkstyle happy, fix minor issues, add better javadoc
mziccard Dec 17, 2015
f569bdd
Move StreamingBuffer to TableInfo, remove streamingBuffer from Extern…
mziccard Dec 17, 2015
433c286
Merge pull request #482 from mziccard/bigquery
ajkannan Dec 17, 2015
2271ab9
Merge branch 'master' into bigquery
mziccard Dec 18, 2015
a08e7bb
Change poms and code to match with master udpates
mziccard Dec 18, 2015
ec115cb
Merge pull request #488 from mziccard/bigquery
aozarov Dec 18, 2015
6bc4f2c
Add integration test
mziccard Dec 18, 2015
e46ce4f
Add BigQuery module to main pom
mziccard Dec 18, 2015
ba8acf1
Few minor fixes and make java8 happy
mziccard Dec 18, 2015
7eee528
Minor fixes to RemoteBigQueryHelper
mziccard Dec 21, 2015
3781aa7
Merge pull request #492 from mziccard/bigquery
aozarov Dec 21, 2015
bf6a3fe
Add BigQuery module README
mziccard Dec 21, 2015
6ee866a
Add troubleshooting section, fix line length, sort imports, remove un…
mziccard Dec 22, 2015
75a0ece
Merge pull request #496 from mziccard/bigquery
ajkannan Dec 22, 2015
862905f
Make BigQuery get/create/updated Table and Job methods generic
mziccard Dec 22, 2015
a0f5f1b
Merge pull request #500 from mziccard/bigquery
aozarov Dec 22, 2015
d299e06
Merge branch 'master' into bigquery
mziccard Dec 22, 2015
7b1b0dc
Add BigQuery to common README.md and TESTING.md
mziccard Dec 22, 2015
a1299c7
Merge pull request #502 from mziccard/bigquery
mziccard Dec 22, 2015
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
Minor javadoc updates, rename functionDefinition to content
  • Loading branch information
mziccard committed Dec 2, 2015
commit 5f6357eaf4c35342f43add62f11c4cc384465ee6
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public Builder type(Type type) {
}

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

/**
* Creates an {@code Field} object.
* Creates a {@code Field} object.
*/
public Field build() {
return new Field(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ public static Builder builder() {
}

public static Schema of(Iterable<Field> fields) {
checkNotNull(fields);
return builder().fields(fields).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public Builder externalConfiguration(ExternalDataConfiguration externalConfigura
}

/**
* Sets a user-friendly name for the dataset.
* Sets a user-friendly name for the table.
*/
public Builder friendlyName(String friendlyName) {
this.friendlyName = firstNonNull(friendlyName, Data.<String>nullOf(String.class));
Expand Down Expand Up @@ -291,8 +291,8 @@ Builder numRows(Long numRows) {
}

/**
* Sets the table's schema. Providing a schema is not necessary when {@link #viewQuery} is
* provided.
* Sets the table's schema. Providing a schema is not necessary when {@link #viewQuery(String)}
* or {@link #externalConfiguration(ExternalDataConfiguration)} are provided.
*/
public Builder schema(Schema schema) {
this.schema = schema;
Expand Down Expand Up @@ -380,7 +380,7 @@ public String etag() {
}

/**
* Returns an opaque id for the dataset.
* Returns an opaque id for the table.
*/
public String id() {
return id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,29 @@ public enum Type {
}

private final Type type;
private final String functionDefinition;
private final String content;

UserDefinedFunction(Type type, String functionDefinition) {
UserDefinedFunction(Type type, String content) {
this.type = type;
this.functionDefinition = functionDefinition;
this.content = content;
}

public Type type() {
return type;
}

/**
* Returns function's definition. If {@link #type()} is {@link Type#INLINE} this method returns
* a code blob. If {@link #type()} is {@link Type#FROM_URI} this method returns a Google Cloud
* Storage URI (e.g. gs://bucket/path).
* If {@link #type()} is {@link Type#INLINE} this method returns a code blob. If {@link #type()}
* is {@link Type#FROM_URI} the method returns a Google Cloud Storage URI (e.g. gs://bucket/path).
*/
public String functionDefinition() {
return functionDefinition;
public String content() {
return content;
}

/**
* A Google Cloud BigQuery user-defined function, as a code blob.
*/
public static final class InlineFunction extends UserDefinedFunction {
static final class InlineFunction extends UserDefinedFunction {

private static final long serialVersionUID = 1083672109192091686L;

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

@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("inlineCode", functionDefinition()).toString();
return MoreObjects.toStringHelper(this).add("inlineCode", content()).toString();
}

@Override
public com.google.api.services.bigquery.model.UserDefinedFunctionResource toPb() {
return new com.google.api.services.bigquery.model.UserDefinedFunctionResource()
.setInlineCode(functionDefinition());
.setInlineCode(content());
}
}

/**
* A Google Cloud BigQuery user-defined function, as an URI to Google Cloud Storage.
*/
public static final class UriFunction extends UserDefinedFunction {
static final class UriFunction extends UserDefinedFunction {

private static final long serialVersionUID = 4660331691852223839L;

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

@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("functionUri", functionDefinition()).toString();
return MoreObjects.toStringHelper(this).add("functionUri", content()).toString();
}

@Override
public com.google.api.services.bigquery.model.UserDefinedFunctionResource toPb() {
return new com.google.api.services.bigquery.model.UserDefinedFunctionResource()
.setResourceUri(functionDefinition());
.setResourceUri(content());
}
}

@Override
public int hashCode() {
return Objects.hash(type, functionDefinition);
return Objects.hash(type, content);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public class UserDefinedFunctionTest {

@Test
public void testConstructor() {
assertEquals(INLINE, INLINE_FUNCTION.functionDefinition());
assertEquals(INLINE, INLINE_FUNCTION.content());
assertEquals(UserDefinedFunction.Type.INLINE, INLINE_FUNCTION.type());
assertEquals(URI, URI_FUNCTION.functionDefinition());
assertEquals(URI, URI_FUNCTION.content());
assertEquals(UserDefinedFunction.Type.FROM_URI, URI_FUNCTION.type());
}

Expand All @@ -51,6 +51,6 @@ public void testToAndFromPb() {
private void compareUserDefinedFunction(UserDefinedFunction expected, UserDefinedFunction value) {
assertEquals(expected, value);
assertEquals(expected.type(), value.type());
assertEquals(expected.functionDefinition(), value.functionDefinition());
assertEquals(expected.content(), value.content());
}
}