gt;>>>> Best,
>>>>> Yik San
>>>>>
>>>>> On Tue, Mar 23, 2021 at 1:29 PM Dian Fu wrote:
>>>>>
>>>>>> H Yik San,
>>>>>>
>>>>>> As the udf `add` is decorated with `@udf` decorator
it is no longer a
>> simple Python function if you reference `add`. If you execute
>> `print(type(add(1, 1)))`, you will see the output is something like "> 'pyflink.table.expression.Expression'>".
>>
>> You could try the following code: assert add._func
decorator, it is no longer a
>>>>> simple Python function if you reference `add`. If you execute
>>>>> `print(type(add(1, 1)))`, you will see the output is something like
>>>>> ">>>> 'pyflink.table.expression.Expression'>&q
on.
>
> Regards,
> Dian
>
> On Tue, Mar 23, 2021 at 10:56 AM Yik San Chan <mailto:evan.chanyik...@gmail.com>> wrote:
> (This question is cross-posted on StackOverflow
> https://stackoverflow.com/questions/66756612/failed-to-unit-test-pyflink-udf
> <ht
t;>>> 'pyflink.table.expression.Expression'>".
>>>>
>>>> You could try the following code: assert add._func(1, 1) == 3
>>>>
>>>> add._func returns the original Python function.
>>>>
>>>> Regards,
>>>
n function.
>>>
>>> Regards,
>>> Dian
>>>
>>> On Tue, Mar 23, 2021 at 10:56 AM Yik San Chan
>>> wrote:
>>>
>>>> (This question is cross-posted on StackOverflow
>>>> https://stackoverflow.com/questions/
t;>
>> On Tue, Mar 23, 2021 at 10:56 AM Yik San Chan
>> wrote:
>>
>>> (This question is cross-posted on StackOverflow
>>> https://stackoverflow.com/questions/66756612/failed-to-unit-test-pyflink-udf
>>> )
>>>
>>> I am usin
1 at 10:56 AM Yik San Chan
> wrote:
>
>> (This question is cross-posted on StackOverflow
>> https://stackoverflow.com/questions/66756612/failed-to-unit-test-pyflink-udf
>> )
>>
>> I am using PyFlink and I want to unit test my UDF written in Python.
>>
nc returns the original Python function.
Regards,
Dian
On Tue, Mar 23, 2021 at 10:56 AM Yik San Chan
wrote:
> (This question is cross-posted on StackOverflow
> https://stackoverflow.com/questions/66756612/failed-to-unit-test-pyflink-udf
> )
>
> I am using PyFlink and I want to un
(This question is cross-posted on StackOverflow
https://stackoverflow.com/questions/66756612/failed-to-unit-test-pyflink-udf
)
I am using PyFlink and I want to unit test my UDF written in Python.
To test the simple udf below:
```python
# tasks/helloworld/udf.py
from pyflink.table import
10 matches
Mail list logo