有没有遇到过这个情况的,怎么处理? flink1.13 时间窗口报错:Caused by: org.apache.flink.table.api.TableException: Rowtime attributes must not be in the input rows of a regular join. As a workaround you can cast the time attributes of input tables to TIMESTAMP before.
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
问题描述: 您在使用Flink 1.13时遇到时间窗口报错,错误信息为:Caused by: org.apache.flink.table.api.TableException: Rowtime attributes must not be in the input rows of a regular join. As a workaround you can cast the time attributes of input tables to TIMESTAMP before.
这表明您在执行常规连接操作时,输入表中包含了rowtime属性,而这是不被允许的。
可能原因:
解决步骤:
SELECT * FROM tableA JOIN tableB ON tableA.time = tableB.time
的语句,应修改为:
SELECT *
FROM (SELECT CAST(time AS TIMESTAMP) AS time_processed, ... FROM tableA) AS tableA_processed
JOIN (SELECT CAST(time AS TIMESTAMP) AS time_processed, ... FROM tableB) AS tableB_processed
ON tableA_processed.time_processed = tableB_processed.time_processed
注意事项:
通过以上步骤,您应该能够解决因rowtime属性导致的连接操作错误。如果问题仍然存在或有其他疑问,欢迎继续提问。
参考资料: - Flink官方文档关于时间属性使用的说明(虽未直接引用具体文档,但基于通用知识库和Flink处理时间属性的原则)。您可以复制页面截图提供更多信息,我可以进一步帮您分析问题原因。