hequn8128 commented on a change in pull request #11556: [FLINK-16847][python]
Support timestamp types in vectorized Python UDF
URL: https://github.com/apache/flink/pull/11556#discussion_r400000287
##########
File path: flink-python/pyflink/table/tests/test_pandas_udf.py
##########
@@ -140,6 +142,16 @@ def time_func(time_param):
'time_param of wrong type %s !' % type(time_param[0])
return time_param
+ timestamp_value = datetime.datetime(1970, 1, 1, 0, 0, 0, 123000)
+
+ def timestamp_func(timestamp_param):
+ assert isinstance(timestamp_param, pd.Series)
+ assert isinstance(timestamp_param[0], datetime.datetime), \
+ 'timestamp_param of wrong type %s !' % type(timestamp_param[0])
+ assert timestamp_param[0] == timestamp_value, \
+ 'timestamp_param is wrong value %s, %s!' %
(timestamp_param[0], timestamp_value)
Review comment:
How about "timestamp_param is wrong value %s, should be %s!"
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services