hequn8128 commented on a change in pull request #10055: [FLINK-14573][python]
Support time data types in Python user-defined functions
URL: https://github.com/apache/flink/pull/10055#discussion_r342545530
##########
File path: flink-python/pyflink/table/tests/test_udf.py
##########
@@ -352,18 +364,27 @@ def date_func(date_param):
self.t_env.register_function(
"date_func", udf(date_func, [DataTypes.DATE()], DataTypes.DATE()))
+ self.t_env.register_function(
+ "time_func", udf(time_func, [DataTypes.TIME()], DataTypes.TIME()))
+
+ self.t_env.register_function(
+ "timestamp_func", udf(timestamp_func, [DataTypes.TIMESTAMP()],
DataTypes.TIMESTAMP()))
+
table_sink = source_sink_utils.TestAppendSink(
- ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k'],
+ ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm'],
[DataTypes.BIGINT(), DataTypes.BIGINT(), DataTypes.TINYINT(),
DataTypes.BOOLEAN(), DataTypes.SMALLINT(), DataTypes.INT(),
DataTypes.FLOAT(), DataTypes.DOUBLE(), DataTypes.BYTES(),
- DataTypes.STRING(), DataTypes.DATE()])
+ DataTypes.STRING(), DataTypes.DATE(), DataTypes.TIME(),
Review comment:
test time with precision.
----------------------------------------------------------------
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