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

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

                Author: ASF GitHub Bot
            Created on: 08/Nov/18 23:57
            Start Date: 08/Nov/18 23:57
    Worklog Time Spent: 10m 
      Work Description: amaliujia commented on a change in pull request #6991: 
[BEAM-6017] [WIP] Support nanosecond precision for DateTime field in Row
URL: https://github.com/apache/beam/pull/6991#discussion_r232103598
 
 

 ##########
 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/values/Row.java
 ##########
 @@ -283,8 +292,12 @@ public String getString(int idx) {
    */
   @Nullable
   public ReadableDateTime getDateTime(int idx) {
-    ReadableInstant instant = getValue(idx);
-    return instant == null ? null : new 
DateTime(instant).withZone(instant.getZone());
+    Instant instant = getValue(idx);
 
 Review comment:
    I think `public abstract <T> T getValue(int fieldIdx);` should be changed 
to `private` and all value access to Row should go though specific type access 
method, e.g. `public int16 getInt6(int idx)`, `public ReadableDateTime 
getDateTime`, etc. 
   
   By doing so, we can hide the internal representation of Row. 
   
   Right now I at least see BeamSQL implementation uses `public <T> T 
getValue(int fieldIdx)` directly, which access the value saved in Row.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 164152)
    Time Spent: 50m  (was: 40m)

> Support nanosecond precision for DATETIME in Schema
> ---------------------------------------------------
>
>                 Key: BEAM-6017
>                 URL: https://issues.apache.org/jira/browse/BEAM-6017
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-core
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>




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

Reply via email to