link-1.10 sql只支持 timestamp(3) 类型字段生成watermark 但是long这样转换后也可以生成watermark很奇怪? CREATE TABLE user_log ( response_size int, rowtime BIGINT, w_ts as TO_TIMESTAMP(FROM_UNIXTIME(rowtime/1000),'yyyy-MM-dd HH:mm:ss'), WATERMARK FOR w_ts AS w_ts - INTERVAL '5' SECOND --5秒的延迟 )
来自志愿者整理的flink邮件归档来自志愿者整理的FLINK邮件归档
w_ts as TO_TIMESTAMP(FROM_UNIXTIME(rowtime/1000),'yyyy-MM-dd HH:mm:ss'),这个语句产生的就是一个timestamp的数据Flink内置函数:https://ci.apache.org/projects/flink/flink-docs-release-1.10/zh/dev/table/functions/systemFunctions.htmlFROM_UNIXTIME(numeric[, string]): Returns a representation of the numeric argument as a value in string format (default is 'YYYY-MM-DD hh:mm:ss'). numeric is an internal timestamp value representing seconds since '1970-01-01 00:00:00' UTC, such as produced by the UNIX_TIMESTAMP() function. The return value is expressed in the session time zone (specified in TableConfig). E.g., FROM_UNIXTIME(44) returns '1970-01-01 09:00:44' if in UTC time zone, but returns '1970-01-01 09:00:44' if in 'Asia/Tokyo' time zone. Only supported in blink planner. TO_TIMESTAMP(string1[, string2]): Converts date time string string1 with format string2 (by default: 'yyyy-MM-dd HH:mm:ss') under the session time zone (specified by TableConfig) to a timestamp. Only supported in blink planner.
来自志愿者整理的flink邮件归档来自志愿者整理的FLINK邮件归档
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。