Open hraj6056 opened 7 months ago
Got an evaluation error ("found no matching overload for 'relation_eq' applied to '(<class 'celpy.celtypes.StringType'>, <class 'NoneType'>)'", <class 'TypeError'>, ("no such overload: StringType('temp') <class 'celpy.celtypes.StringType'> != None <class 'NoneType'>",))
all_positive = "record.fullname != null" breaks = celpy.json_to_cel({'record': {'fullname': 'temp', 'overdraftProtection': False} }) ast = env.compile(all_positive) prgm = env.program(ast) try: result =prgm.evaluate(breaks) print(result) except CELEvalError as ex: print('Got an evaluation error', ex) except TypeError as ex: print('Got a type error')
Is there any hack or something to succesfully evaluate this as it is working in this CELPlayground which is built in go.
I think just needs us to add the additional type comparisons against None, I don't have bandwidth on the moment for this, but pull requests welcome.
Got an evaluation error ("found no matching overload for 'relation_eq' applied to '(<class 'celpy.celtypes.StringType'>, <class 'NoneType'>)'", <class 'TypeError'>, ("no such overload: StringType('temp') <class 'celpy.celtypes.StringType'> != None <class 'NoneType'>",))
Is there any hack or something to succesfully evaluate this as it is working in this CELPlayground which is built in go.