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

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

                Author: ASF GitHub Bot
            Created on: 26/Mar/20 18:43
            Start Date: 26/Mar/20 18:43
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on pull request #11222: [BEAM-4150] 
Don't window PCollection coders.
URL: https://github.com/apache/beam/pull/11222#discussion_r398808389
 
 

 ##########
 File path: 
sdks/python/apache_beam/runners/portability/fn_api_runner/translations.py
 ##########
 @@ -347,6 +348,22 @@ def add_or_get_coder_id(self,
     self.components.coders[new_coder_id].CopyFrom(coder_proto)
     return new_coder_id
 
+  def add_data_channel_coder(self, pcoll_id):
+    pcoll = self.components.pcollections[pcoll_id]
+    proto = beam_runner_api_pb2.Coder(
+        spec=beam_runner_api_pb2.FunctionSpec(
+            urn=common_urns.coders.WINDOWED_VALUE.urn),
+        component_coder_ids=[
+            pcoll.coder_id,
+            self.components.windowing_strategies[
+                pcoll.windowing_strategy_id].window_coder_id
+        ])
+    channel_coder = self.add_or_get_coder_id(
+        proto, pcoll.coder_id + '_windowed')
+    if pcoll.coder_id in self.safe_coders:
+      channel_coder = self.length_prefixed_coder(channel_coder)
 
 Review comment:
   Yes, but here `pcoll.coder_id != channel_coder`. 
 
----------------------------------------------------------------
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: 410484)
    Time Spent: 7h 50m  (was: 7h 40m)

> Standardize use of PCollection coder proto attribute
> ----------------------------------------------------
>
>                 Key: BEAM-4150
>                 URL: https://issues.apache.org/jira/browse/BEAM-4150
>             Project: Beam
>          Issue Type: Task
>          Components: beam-model
>            Reporter: Robert Bradshaw
>            Assignee: Luke Cwik
>            Priority: Major
>             Fix For: 2.20.0
>
>          Time Spent: 7h 50m
>  Remaining Estimate: 0h
>
> In some places it's expected to be a WindowedCoder, in others the raw 
> ElementCoder. We should use the same convention (decided in discussion to be 
> the raw ElementCoder) everywhere. The WindowCoder can be pulled out of the 
> attached windowing strategy, and the input/output ports should specify the 
> encoding directly rather than read the adjacent PCollection coder fields. 



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

Reply via email to