[
https://issues.apache.org/jira/browse/BEAM-12934?focusedWorklogId=654744&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-654744
]
ASF GitHub Bot logged work on BEAM-12934:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Sep/21 20:53
Start Date: 23/Sep/21 20:53
Worklog Time Spent: 10m
Work Description: robertwb commented on a change in pull request #15550:
URL: https://github.com/apache/beam/pull/15550#discussion_r715145597
##########
File path:
sdks/python/apache_beam/runners/portability/fn_api_runner/translations.py
##########
@@ -357,12 +357,29 @@ def wrapper(self, *args):
class TransformContext(object):
- _KNOWN_CODER_URNS = set(
+ _COMMON_CODER_URNS = set(
value.urn for (key, value) in common_urns.coders.__dict__.items()
if not key.startswith('_')
# Length prefix Rows rather than re-coding them.
) - set([common_urns.coders.ROW.urn])
+ _REQUIRED_CODER_URNS = set([
+ common_urns.coders.WINDOWED_VALUE.urn,
+ # For impulse.
+ common_urns.coders.BYTES.urn,
+ common_urns.coders.GLOBAL_WINDOW.urn,
+ # For GBK.
+ common_urns.coders.KV.urn,
+ common_urns.coders.ITERABLE.urn,
+ # For SDF.
+ common_urns.coders.DOUBLE.urn,
Review comment:
One could, I suppose, do away with the notion of required coders, and
rely on the fact that SDKs will provide them (so the intersection would contain
whatever is necessary). I do think it simplifies things to be able to just
assume that, say, KV coder is around rather than wondering if/when one needs to
length prefix it in the implementation of various primitives.
This also guards against poor behavior in case some SKD doesn't populate
this field...
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 654744)
Time Spent: 1h (was: 50m)
> Python should length prefix coders according to the capabilities of the
> environment.
> ------------------------------------------------------------------------------------
>
> Key: BEAM-12934
> URL: https://issues.apache.org/jira/browse/BEAM-12934
> Project: Beam
> Issue Type: Bug
> Components: runner-py-direct
> Reporter: Robert Bradshaw
> Assignee: Robert Bradshaw
> Priority: P2
> Time Spent: 1h
> Remaining Estimate: 0h
>
> See context at
> https://lists.apache.org/thread.html/r65c3464010372b442365ac38601a0312081ae3dcfb77e7eb64ff811b%40%3Cdev.beam.apache.org%3E
--
This message was sent by Atlassian Jira
(v8.3.4#803005)