[ 
https://issues.apache.org/jira/browse/BEAM-7064?focusedWorklogId=226837&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-226837
 ]

ASF GitHub Bot logged work on BEAM-7064:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Apr/19 18:29
            Start Date: 12/Apr/19 18:29
    Worklog Time Spent: 10m 
      Work Description: amaliujia commented on pull request #8289: [BEAM-7064] 
Reject BigQuery data with sub-millisecond precision, instead of losing data
URL: https://github.com/apache/beam/pull/8289#discussion_r275017781
 
 

 ##########
 File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/AvroUtils.java
 ##########
 @@ -73,8 +69,19 @@ public static Object convertAvroFormat(Field beamField, 
Object value) {
       default:
         throw new RuntimeException("Does not support converting unknown type 
value");
     }
+  }
 
-    return ret;
+  private static ReadableInstant safeToMillis(Object value) {
+    long subMilliPrecision = ((long) value) % 1000;
 
 Review comment:
   How do we know that that the value returned is not millis but micros?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 226837)
    Time Spent: 40m  (was: 0.5h)

> Conversion of timestamp from BigQuery row to Beam row loses precision
> ---------------------------------------------------------------------
>
>                 Key: BEAM-7064
>                 URL: https://issues.apache.org/jira/browse/BEAM-7064
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Kenneth Knowles
>            Assignee: Kenneth Knowles
>            Priority: Critical
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently, the utilities to convert from BigQuery row to Beam row simply 
> truncate timestamps at millisecond precision. This is unacceptable. Instead, 
> an error should be raised indicating that it is not supported.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to