heavyai/rbc

Cannot call a UDF with boolean values

Closed this issue · 1 comments

def test_bool(heavydb):

    from rbc.stdlib import array_api

    @heavydb('bool(bool, bool)')
    def foo(x, y):
        return array_api.bitwise_and(x, y)

    print(foo(True, False).execute())
rbc/tests/heavydb/test_array_api_datatypes.py:38: in test_bool
    print(foo([True, False], [False, True]).execute())
rbc/remotejit.py:408: in __call__
    return caller(*arguments, device=device, hold=hold)
rbc/remotejit.py:443: in __call__
    atypes = self.remotejit.get_types(*arguments)
rbc/heavydb/remoteheavydb.py:1429: in get_types
    items_types = set(map(typesystem.Type.fromvalue, value))
rbc/typesystem.py:1212: in fromvalue
    raise NotImplementedError('%s.fromvalue(%r|%s)'
E   NotImplementedError: Type.fromvalue(True|<class 'bool'>)
pearu commented

Fixed via #578