tvalentyn commented on a change in pull request #14634:
URL: https://github.com/apache/beam/pull/14634#discussion_r624325738
##########
File path: sdks/python/apache_beam/examples/complete/top_wikipedia_sessions.py
##########
@@ -93,9 +93,8 @@ def expand(self, pcoll):
| 'TopPerMonthWindow' >> beam.WindowInto(
FixedWindows(size=THIRTY_DAYS_IN_SECONDS))
| 'Top' >> combiners.core.CombineGlobally(
- combiners.TopCombineFn(
- 10,
- lambda first, second: first[1] <
second[1])).without_defaults())
+ combiners.TopCombineFn(n=10,
+ key=lambda x: x[1])).without_defaults())
Review comment:
sessions_count SGTM, thanks.
combiners.TopCombineFn is a public api, so this would mean an API change. If
we had an API change, some users could be broken by this PR. But I suspect we
don't have an API change for Py3 users, since we already disallowed compare on
py3, and this example was already not working on Python 3, and will start
working after this change. Does this sound correct?
--
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]