[
https://issues.apache.org/jira/browse/BEAM-10549?focusedWorklogId=472675&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-472675
]
ASF GitHub Bot logged work on BEAM-10549:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Aug/20 23:06
Start Date: 19/Aug/20 23:06
Worklog Time Spent: 10m
Work Description: robertwb commented on a change in pull request #12352:
URL: https://github.com/apache/beam/pull/12352#discussion_r473415998
##########
File path: sdks/python/apache_beam/examples/snippets/snippets.py
##########
@@ -689,8 +689,9 @@ def examples_wordcount_streaming(argv):
output = (
lines
- | 'DecodeUnicode' >>
- beam.FlatMap(lambda encoded: encoded.decode('utf-8'))
+ | 'DecodeUnicode' >> beam.FlatMap(
+ lambda encoded:
+ (encoded if isinstance(encoded, list) else
encoded.decode('utf-8')))
Review comment:
This should be changed to `beam.Map(lambda encoded:
encoded.decode('utf-8'))` and the test values below changed back to bytes.
----------------------------------------------------------------
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: 472675)
Time Spent: 8.5h (was: 8h 20m)
> Improve Runtime Type Checking Performance
> -----------------------------------------
>
> Key: BEAM-10549
> URL: https://issues.apache.org/jira/browse/BEAM-10549
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Reporter: Saavan Nanavati
> Assignee: Saavan Nanavati
> Priority: P2
> Time Spent: 8.5h
> Remaining Estimate: 0h
>
> The performance gain will come from moving the runtime type check from a
> decorator to OperationCounters.
>
> This has (2) improvements:
> # Cython optimizable
> # Sampling is a built-in feature
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)