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

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

                Author: ASF GitHub Bot
            Created on: 03/Nov/18 02:52
            Start Date: 03/Nov/18 02:52
    Worklog Time Spent: 10m 
      Work Description: tvalentyn commented on a change in pull request #6925: 
[BEAM-5315] Partially port IO: avro schema parsing and codecs
URL: https://github.com/apache/beam/pull/6925#discussion_r230543155
 
 

 ##########
 File path: sdks/python/apache_beam/examples/avro_bitcoin.py
 ##########
 @@ -38,7 +38,9 @@
 
 # pylint: disable=wrong-import-order, wrong-import-position
 try:
-  from avro.schema import Parse # avro-python3 library for python3
+  from avro.schema import Parse as avro_parser # avro-python3 library for 
python3
+  Parse = lambda x: avro_parser(x.decode("utf-8")) \
 
 Review comment:
   It's recommended not to design APIs that accept both text and binary data, 
see: https://docs.python.org/3/howto/pyporting.html. 
   Do we understand why the type of input is inconsistent? If textual data is 
passed in as `bytes`, can we decode them earlier, before calling `Parse`? 

----------------------------------------------------------------
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: 162184)
    Time Spent: 5h 20m  (was: 5h 10m)

> Finish Python 3 porting for io module
> -------------------------------------
>
>                 Key: BEAM-5315
>                 URL: https://issues.apache.org/jira/browse/BEAM-5315
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Robbe
>            Assignee: Simon
>            Priority: Major
>          Time Spent: 5h 20m
>  Remaining Estimate: 0h
>




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

Reply via email to