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

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

                Author: ASF GitHub Bot
            Created on: 06/Oct/19 20:15
            Start Date: 06/Oct/19 20:15
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on pull request #9735: 
[BEAM-8355] Add a standard boolean coder
URL: https://github.com/apache/beam/pull/9735#discussion_r331808080
 
 

 ##########
 File path: sdks/python/apache_beam/coders/coders.py
 ##########
 @@ -420,6 +423,31 @@ def __hash__(self):
 Coder.register_structured_urn(common_urns.coders.BYTES.urn, BytesCoder)
 
 
+class BooleanCoder(FastCoder):
+  def _create_impl(self):
+    return coder_impl.BooleanCoderImpl()
+
+  def is_deterministic(self):
+    return True
+
+  def to_type_hint(self):
+    return bool
+
+  def as_cloud_object(self, coders_context=None):
+    return {
+        '@type': 'kind:bool',
+    }
 
 Review comment:
   You shouldn't have to change as_cloud_object. That method is a 
Dataflow-specific thing hacked into the coders. Since Dataflow doesn't need to 
understand it, there's no need for anything custom.
 
----------------------------------------------------------------
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: 324090)
    Time Spent: 40m  (was: 0.5h)

> Make BooleanCoder a standard coder
> ----------------------------------
>
>                 Key: BEAM-8355
>                 URL: https://issues.apache.org/jira/browse/BEAM-8355
>             Project: Beam
>          Issue Type: New Feature
>          Components: beam-model, sdk-java-core, sdk-py-core
>            Reporter: Chad Dombrova
>            Assignee: Chad Dombrova
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> This involves making the current java BooleanCoder a standard coder, and 
> implementing an equivalent coder in python



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

Reply via email to