ahmedabu98 commented on code in PR #23620:
URL: https://github.com/apache/beam/pull/23620#discussion_r1007086324
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOReadTest.java:
##########
@@ -403,11 +483,21 @@ private void testReadFromTable(boolean
useTemplateCompatibility, boolean useRead
fakeDatasetService.createDataset("non-executing-project", "somedataset",
"", "", null);
fakeDatasetService.createTable(sometable);
+ byte[] bytes = new BigDecimal("10.223").unscaledValue().toByteArray();
List<TableRow> records =
Lists.newArrayList(
- new TableRow().set("name", "a").set("number", 1L),
- new TableRow().set("name", "b").set("number", 2L),
- new TableRow().set("name", "c").set("number", 3L));
+ new TableRow()
+ .set("name", "a")
+ .set("number", 1L)
+ .set("numeric_num", ByteBuffer.wrap(bytes)),
+ new TableRow()
+ .set("name", "b")
+ .set("number", 2L)
+ .set("numeric_num", ByteBuffer.wrap(bytes)),
+ new TableRow()
+ .set("name", "c")
+ .set("number", 3L)
+ .set("numeric_num", ByteBuffer.wrap(bytes)));
Review Comment:
The read pipeline in this test still only looks for the `name` and `number`
fields. Can you adjust this so that it also looks for and tests the numeric
type?
P.S. if you add another numeric field you can use your MyData class instead
of KVs here as well
--
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]