[
https://issues.apache.org/jira/browse/FLINK-6595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409282#comment-16409282
]
Fabian Hueske commented on FLINK-6595:
--------------------------------------
You don't need to separate the query (and I did not say anything like that).
All time attributes must be explicitly handled in SQL. Your original query does
not pass the SQL validator, because the inner query does not provide an
attribute called {{proctime}}.
If you look closely at the query that I posted, you'll find that I added
{{TUMBLE_PROCTIME(proctime, interval '1' DAY) as proctime}}. The
{{TUMBLE_PROCTIME}} method forward the processing time attribute of a tumbling
window.
> Nested SQL queries do not expose proctime / rowtime attributes
> --------------------------------------------------------------
>
> Key: FLINK-6595
> URL: https://issues.apache.org/jira/browse/FLINK-6595
> Project: Flink
> Issue Type: Bug
> Components: Table API & SQL
> Reporter: Haohui Mai
> Assignee: Haohui Mai
> Priority: Major
> Fix For: 1.3.0
>
>
> We found out that the group windows cannot be applied with nested queries
> out-of-the-box:
> {noformat}
> SELECT * FROM (
> (SELECT ...)
> UNION ALL)
> (SELECT ...)
> ) GROUP BY foo, TUMBLE(proctime, ...)
> {noformat}
> Flink complains about {{proctime}} is undefined.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)