You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/08/08 06:45:47 UTC

[GitHub] [beam] manitgupta commented on a diff in pull request #22428: Add units tests for SpannerIO

manitgupta commented on code in PR #22428:
URL: https://github.com/apache/beam/pull/22428#discussion_r939874937


##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/MutationUtilsTest.java:
##########
@@ -70,11 +83,47 @@ public class MutationUtilsTest {
           .withFieldValue("f_struct", EMPTY_ROW)
           .withFieldValue("f_struct_int64", INT64_ROW)
           .withFieldValue("f_array", ImmutableList.of(2L, 3L))
+          .withFieldValue("f_double_array", ImmutableList.of(1., 2.))
+          .withFieldValue(
+              "f_decimal_array",
+              ImmutableList.of(
+                  BigDecimal.valueOf(Long.MIN_VALUE), BigDecimal.valueOf(Long.MAX_VALUE)))
+          .withFieldValue("f_boolean_array", ImmutableList.of(false, true))
+          .withFieldValue("f_string_array", ImmutableList.of("donald_duck", "micky_mouse"))
+          .withFieldValue(
+              "f_bytes_array",
+              ImmutableList.of("some_bytes".getBytes(UTF_8), "some_bytes".getBytes(UTF_8)))
+          .withFieldValue(
+              "f_datetime_array",
+              ImmutableList.of(
+                  DateTime.parse("2077-10-15T00:00:00+00:00"),

Review Comment:
   The string provided fully specified the date, time and the offset (`+00:00`) as per `ISO 8601` standard. So this won't be machine dependent. 
   I also checked this by verifying that other existing unit tests use the same conversion logic. 



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org