manitgupta commented on code in PR #22428:
URL: https://github.com/apache/beam/pull/22428#discussion_r939878432
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/MutationUtilsTest.java:
##########
@@ -235,10 +311,42 @@ private static Mutation createMutation(Mutation.Op
operation) {
.to(Struct.newBuilder().set("int64").to(3L).build())
.set("f_array")
.toInt64Array(ImmutableList.of(2L, 3L))
+ .set("f_double_array")
+ .toFloat64Array(ImmutableList.of(1., 2.))
+ .set("f_decimal_array")
+ .toNumericArray(
+ ImmutableList.of(
+ BigDecimal.valueOf(Long.MIN_VALUE),
BigDecimal.valueOf(Long.MAX_VALUE)))
+ .set("f_boolean_array")
+ .toBoolArray(ImmutableList.of(false, true))
+ .set("f_string_array")
+ .toStringArray(ImmutableList.of("donald_duck", "micky_mouse"))
+ .set("f_bytes_array")
+ .toBytesArray(
+ ImmutableList.of(
+ ByteArray.copyFrom("some_bytes".getBytes(UTF_8)),
+ ByteArray.copyFrom("some_bytes".getBytes(UTF_8))))
+ .set("f_datetime_array")
+ .toTimestampArray(
+ ImmutableList.of(
+ Timestamp.parseTimestamp("2077-10-15T00:00:00Z"),
Review Comment:
This string is as per the `RFC 3399` format. It specifies a fully qualified
date string with date, time and offset (`Z` translates to UTC+0). Since there
is no ambiguity in the specification, it won't be dependent on machine
timezone.
Also verified by checking usage in other existing unit tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]