GeezerVison is showing github.com (truncated) — Cloud Spanner: Make Spanner value classes serializable by mairbek · Pull Request #2040 · googleapis/google-cloud-java
Conversation
mairbek
commented
May 8, 2017
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Is needed to get PCollection<Struct> in Apache Beam working.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
private static final long serialVersionUID = 695127243179520960L;
|
|
|
private final List<com.google.protobuf.Value> underlying;
|
|
|
|
|
|
private StringArray(List<com.google.protobuf.Value> underlying) {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
private static final long serialVersionUID = -2850504708084921083L;
|
|
|
private final List<com.google.protobuf.Value> underlying;
|
|
|
|
|
|
private BoolArray(List<com.google.protobuf.Value> underlying) {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Changes Unknown when pulling 3375959 on mairbek:struct-mutations into ** on GoogleCloudPlatform:master**.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Changes Unknown when pulling afbd59a on mairbek:struct-mutations into ** on GoogleCloudPlatform:master**.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
@@ -2474,6 +2466,8 @@ A toPrimitiveArray(int columnIndex) { |
|
|
}
|
|
|
|
|
|
private static class Int64Array extends PrimitiveArray<Long, long[]> {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
*/
|
|
|
@Immutable
|
|
|
public abstract class Struct extends AbstractStructReader {
|
|
|
public abstract class Struct extends AbstractStructReader implements Serializable {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.003%) to 80.905% when pulling 73fdfa3 on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Reverted Struct serialization
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
mairbek
changed the title
Cloud Spanner: Make Struct serializable
Cloud Spanner: Make Spanner value classes serializable
May 25, 2017
|

Coverage remained the same at 80.902% when pulling a6005ed on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.003%) to 80.905% when pulling 73fdfa3 on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.003%) to 80.905% when pulling 73fdfa3 on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage remained the same at 80.902% when pulling a6005ed on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage remained the same at 80.902% when pulling a6005ed on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
public final class Statement implements Serializable {
|
|
|
private static final long serialVersionUID = -1967958247625065259L;
|
|
|
|
|
|
private final ImmutableMap<String, Value> parameters;
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.3%) to 81.164% when pulling b37df27 on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
case ARRAY:
|
|
|
switch(fieldType.getArrayElementType().getCode()) {
|
|
|
case BOOL:
|
|
|
builder.set(fieldName).toBoolArray((Iterable<Boolean>) value);
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
builder.set(fieldName).toDateArray((Iterable<Date>) value);
|
|
|
break;
|
|
|
case STRUCT:
|
|
|
builder.add(fieldName, fieldType.getStructFields(), (Iterable<Struct>) value);
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
Value.timestampArray(null),
|
|
|
Value.dateArray(ImmutableList.of(
|
|
|
Date.fromYearMonthDay(2017, 4, 17), Date.fromYearMonthDay(2017, 5, 18))),
|
|
|
Value.dateArray(null)
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
reserializeAndAssert(Value.bytesArray(null));
|
|
|
}
|
|
|
|
|
|
@Test(expected = IllegalStateException.class)
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
|
|
|
reserializeAndAssert(
|
|
|
Value.bytesArray(Arrays.asList(newByteArray("a"), newByteArray("b"))));
|
|
|
Value.bytesArray(BrokenSerializationList.of(newByteArray("a"), newByteArray("b"))));
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.3%) to 81.173% when pulling 893d9f1 on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.3%) to 81.173% when pulling 893d9f1 on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.3%) to 81.173% when pulling 893d9f1 on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
assertThat(stmt.getSql()).isEqualTo(sql);
|
|
|
assertThat(stmt.getParameters()).isEmpty();
|
|
|
assertThat(stmt.toString()).isEqualTo(sql);
|
|
|
reserializeAndAssert(stmt);
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.3%) to 81.187% when pulling 8210ee3 on mairbek:struct-mutations into a08d3fd on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chingor13
pushed a commit
that referenced
this pull request
Jan 26, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
lqiu96
pushed a commit
that referenced
this pull request
Mar 20, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 23, 2026
|