[ https://issues.apache.org/jira/browse/BEAM-9184?focusedWorklogId=376765&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-376765 ]
ASF GitHub Bot logged work on BEAM-9184: ---------------------------------------- Author: ASF GitHub Bot Created on: 24/Jan/20 09:42 Start Date: 24/Jan/20 09:42 Worklog Time Spent: 10m Work Description: EDjur commented on pull request #10636: [BEAM-9184] Add ToSet combiner URL: https://github.com/apache/beam/pull/10636#discussion_r370544966 ########## File path: sdks/python/apache_beam/transforms/combiners_test.py ########## @@ -346,6 +346,18 @@ def match(actual): assert_that(result, matcher()) pipeline.run() + def test_to_set(self): + pipeline = TestPipeline() + the_list = [6, 3, 1, 1, 9, 1, 5, 2, 0, 6] + pcoll = pipeline | 'start' >> Create(the_list) + result = pcoll | 'to list' >> combine.ToSet() Review comment: Saw this in JIRA and made the exact same implementation before I realised the PR was already out :) Small comment: there's a tiny typo here that doesn't really matter. Should be 'to set'. ---------------------------------------------------------------- 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: 376765) Remaining Estimate: 0h Time Spent: 10m > Add ToSet() combiner, similar to ToList() and ToDict() > ------------------------------------------------------ > > Key: BEAM-9184 > URL: https://issues.apache.org/jira/browse/BEAM-9184 > Project: Beam > Issue Type: New Feature > Components: sdk-py-core > Reporter: Jeffrey > Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > ToList() doesn't do deduplication, and ToDict() requires key/value tuples. > Sets are a different type than dicts in Python, so ToSet() is required to > combine very large PCollections while deduplicating. -- This message was sent by Atlassian Jira (v8.3.4#803005)