You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/07/07 10:25:00 UTC

[jira] [Work logged] (BEAM-12532) BigQueryUtils fromBeamField omits ":00" from times with 0 seconds

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

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

                Author: ASF GitHub Bot
            Created on: 07/Jul/21 10:24
            Start Date: 07/Jul/21 10:24
    Worklog Time Spent: 10m 
      Work Description: aromanenko-dev commented on pull request #15070:
URL: https://github.com/apache/beam/pull/15070#issuecomment-875485762


   @mouyang Could you rebase your branch against HEAD and push it?


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


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

    Worklog Id:     (was: 619885)
    Time Spent: 2.5h  (was: 2h 20m)

> BigQueryUtils fromBeamField omits ":00" from times with 0 seconds
> -----------------------------------------------------------------
>
>                 Key: BEAM-12532
>                 URL: https://issues.apache.org/jira/browse/BEAM-12532
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-gcp
>    Affects Versions: 2.30.0
>            Reporter: Matthew Ouyang
>            Assignee: Matthew Ouyang
>            Priority: P2
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> If a value in a Beam Row is of the SqlTypes.TIME data type, BigQueryUtils uses `toString()` to print out the time value [1].  `toString()` tries to optimize the string length by omitting nanoseconds if it is zero, and seconds if it is also zero [2].  However the BigQuery time type requires seconds to always be there even if it's zero [3].
> [1] https://github.com/apache/beam/blob/58e2ea9c40fd08e24f23183852970f566b17d6cd/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java#L551
> [2] https://docs.oracle.com/javase/8/docs/api/java/time/LocalTime.html#toString--
> [3] https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#time_type



--
This message was sent by Atlassian Jira
(v8.3.4#803005)