You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Valentyn Tymofieiev (Jira)" <ji...@apache.org> on 2020/01/28 05:27:00 UTC

[jira] [Resolved] (BEAM-2970) Add comparator function to equal_to

     [ https://issues.apache.org/jira/browse/BEAM-2970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Valentyn Tymofieiev resolved BEAM-2970.
---------------------------------------
    Fix Version/s: Not applicable
       Resolution: Fixed

> Add comparator function to equal_to
> -----------------------------------
>
>                 Key: BEAM-2970
>                 URL: https://issues.apache.org/jira/browse/BEAM-2970
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Sarah Walters
>            Priority: Minor
>             Fix For: Not applicable
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The equal_to function provided by testing/util.py (https://github.com/apache/beam/blob/master/sdks/python/apache_beam/testing/util.py#L54) assumes that the actual and expected lists can be sorted using Python's sorted method (which relies on the < operator) and compared using the == operator.
> If this isn't the case, equal_to sometimes reports False incorrectly, when the expected and actual lists are in different orders.
> Add a comparator function to equal_to in order to allow callers to define a total order.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)