lazylynx commented on a change in pull request #14634:
URL: https://github.com/apache/beam/pull/14634#discussion_r624999408
##########
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:
It seems not to sound correct.
It's true that combiners.Top.Of and PerKey disallow `compare` on Python 3 at
#7842 , but combiners.TopCombineFn was left as is and still allow `compare` as
an arg of the initializer.
Therefore this example have been working fine so far and Python 3 users
could be affected by this PR ( I should have talked about this point in advance
)
--
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]