Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot call a UDF with boolean values #575

Closed
guilhermeleobas opened this issue Jul 17, 2023 · 1 comment
Closed

Cannot call a UDF with boolean values #575

guilhermeleobas opened this issue Jul 17, 2023 · 1 comment

Comments

@guilhermeleobas
Copy link
Contributor

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
Copy link
Contributor

pearu commented Aug 10, 2023

Fixed via #578

@pearu pearu closed this as completed Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants