[ 
https://issues.apache.org/jira/browse/BEAM-5621?focusedWorklogId=163473&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-163473
 ]

ASF GitHub Bot logged work on BEAM-5621:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Nov/18 16:06
            Start Date: 07/Nov/18 16:06
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on issue #6602: [BEAM-5621] Fix 
unorderable types in python 3
URL: https://github.com/apache/beam/pull/6602#issuecomment-436676981
 
 
   Requiring the types to be ordered to compare equality of sets is itself a 
hack. (I don't think we want to asser that they're hashable though, that would 
rule out lists...) 
   
   The right long-term solution is to implement this using matchers, 
determining if any permutation of the inputs matches the expected outputs 
(which can be done much cheaper than examining all permutations), but a short 
term fix might be trying to sort + compare, and if that fails sort using type + 
compare. We should also note that equal_to is best-effort for heterogeneous 
types, and only guerenteed to work (for now) if the elements have an absolute 
ordering. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 163473)
    Time Spent: 3h 20m  (was: 3h 10m)

> Several tests fail on Python 3 with TypeError: unorderable types: str() < 
> int()
> -------------------------------------------------------------------------------
>
>                 Key: BEAM-5621
>                 URL: https://issues.apache.org/jira/browse/BEAM-5621
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Assignee: Juta Staes
>            Priority: Major
>             Fix For: Not applicable
>
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> ======================================================================
> ERROR: test_remove_duplicates 
> (apache_beam.transforms.ptransform_test.PTransformTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/common.py",
>  line 677, in process
>     self.do_fn_invoker.invoke_process(windowed_value)
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/common.py",
>  line 414, in invoke_process
>     windowed_value, self.process_method(windowed_value.value))
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/core.py",
>  line 1068, in <lambda>
>     wrapper = lambda x: [fn(x)]
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/testing/util.py",
>  line 115, in _equal
>     sorted_expected = sorted(expected)
> TypeError: unorderable types: str() < int()



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to