kennknowles commented on code in PR #36425:
URL: https://github.com/apache/beam/pull/36425#discussion_r4017186461


##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOWriteTest.java:
##########
@@ -1302,34 +1312,46 @@ public void runTestWriteAvro(boolean schemaFromView) 
throws Exception {
 
     p.run();
 
+    // Convert values string before comparing.
+    List<TableRow> allRows =
+        fakeDatasetService.getAllRows("project-id", "dataset-id", 
"table-id").stream()
+            .map(
+                (TableRow tr) -> {
+                  Map<String, Object> stringed =
+                      tr.entrySet().stream()
+                          .collect(
+                              Collectors.toMap(Map.Entry::getKey, e -> 
e.getValue().toString()));
+
+                  TableRow tableRow = new TableRow();
+                  tableRow.putAll(stringed);
+                  return tableRow;
+                })
+            .collect(Collectors.toList());
     assertThat(
-        fakeDatasetService.getAllRows("project-id", "dataset-id", "table-id"),
+        allRows,
         containsInAnyOrder(
             new TableRow()
                 .set("strval", "test")
                 .set("longval", "1")
-                .set("doubleval", 1.0)
+                .set("doubleval", "1.0")
                 .set(
                     "instantval",
                     useStorageApi || useStorageApiApproximate
-                        ? 
String.valueOf(Instant.parse("2019-01-01T00:00:00Z").getMillis() * 1000)
+                        ? "2019-01-01 T00:00:00"

Review Comment:
   Noting for anyone dropping in: this is not a good format - not sure it is 
allowed anywhere TBH



-- 
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]

Reply via email to