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

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

                Author: ASF GitHub Bot
            Created on: 14/Apr/19 17:29
            Start Date: 14/Apr/19 17:29
    Worklog Time Spent: 10m 
      Work Description: mxm commented on pull request #8300: [BEAM-7035] 
Compatible wire representation for timers in Python SDK
URL: https://github.com/apache/beam/pull/8300#discussion_r275166195
 
 

 ##########
 File path: sdks/python/apache_beam/coders/coder_impl.py
 ##########
 @@ -491,13 +491,29 @@ def estimate_size(self, value, nested=False):
 
 
 class TimestampCoderImpl(StreamCoderImpl):
-  """For internal use only; no backwards-compatibility guarantees."""
+  """For internal use only; no backwards-compatibility guarantees.
+
+  TODO: SDK agnostic encoding
+  For interoperability with Java SDK, encoding needs to match
+  that of the Java SDK InstantCoder.
+  
https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79
+  """
 
   def encode_to_stream(self, value, out, nested):
-    out.write_bigendian_int64(value.micros)
+    millis = value.micros // 1000
 
 Review comment:
   Does that mean that timestamps were incorrect before?
 
----------------------------------------------------------------
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: 227365)

> Clear() method of OutputTimer is inconsistent
> ---------------------------------------------
>
>                 Key: BEAM-7035
>                 URL: https://issues.apache.org/jira/browse/BEAM-7035
>             Project: Beam
>          Issue Type: Bug
>          Components: beam-model
>            Reporter: Rakesh Kumar
>            Assignee: Thomas Weise
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> [Clear()|https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/worker/bundle_processor.py#L378]
>  method of OutputTimer is not consistent () 
> The timestamp parameter is passed here but never used. Also in the [test 
> cases 
> |[https://github.com/apache/beam/blob/master/sdks/python/apache_beam/transforms/userstate_test.py#L501]]
>  and direct runner timer doesn't pass any parameter in the clear method



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

Reply via email to