[
https://issues.apache.org/jira/browse/BEAM-10490?focusedWorklogId=460550&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-460550
]
ASF GitHub Bot logged work on BEAM-10490:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Jul/20 21:23
Start Date: 17/Jul/20 21:23
Worklog Time Spent: 10m
Work Description: robinyqiu commented on a change in pull request #12261:
URL: https://github.com/apache/beam/pull/12261#discussion_r456680548
##########
File path:
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtilsTest.java
##########
@@ -410,96 +415,49 @@ public void testSubMilliPrecisionRejected() {
assertThrows(
"precision",
IllegalArgumentException.class,
- () ->
- BigQueryUtils.convertAvroFormat(
- Schema.Field.of("dummy", Schema.FieldType.DATETIME).getType(),
- 1000000001L,
- REJECT_OPTIONS));
+ () -> BigQueryUtils.convertAvroFormat(FieldType.DATETIME, 1000000001L,
REJECT_OPTIONS));
}
@Test
public void testMilliPrecisionOk() {
long millis = 123456789L;
assertThat(
- BigQueryUtils.convertAvroFormat(
- Schema.Field.of("dummy", Schema.FieldType.DATETIME).getType(),
- millis * 1000,
- REJECT_OPTIONS),
+ BigQueryUtils.convertAvroFormat(FieldType.DATETIME, millis * 1000,
REJECT_OPTIONS),
equalTo(new Instant(millis)));
}
@Test
public void testSubMilliPrecisionTruncated() {
long millis = 123456789L;
assertThat(
- BigQueryUtils.convertAvroFormat(
- Schema.Field.of("dummy", Schema.FieldType.DATETIME).getType(),
- millis * 1000 + 123,
- TRUNCATE_OPTIONS),
+ BigQueryUtils.convertAvroFormat(FieldType.DATETIME, millis * 1000 +
123, TRUNCATE_OPTIONS),
equalTo(new Instant(millis)));
}
@Test
- public void testSubMilliPrecisionLogicalTypeRejected() {
Review comment:
Yes, it's not relavent anymore. ZetaSQL TIME type is now able to support
micro-second precision.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 460550)
Time Spent: 1h 10m (was: 1h)
> Support read/write ZetaSQL DATE/TIME types from/to BigQuery
> -----------------------------------------------------------
>
> Key: BEAM-10490
> URL: https://issues.apache.org/jira/browse/BEAM-10490
> Project: Beam
> Issue Type: New Feature
> Components: dsl-sql-zetasql, io-java-gcp
> Reporter: Robin Qiu
> Assignee: Robin Qiu
> Priority: P2
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)