Hi Bill,
you can use HOP_ROWTIME()/HOP_PROCTIME() to propagate the time attribute
to the outer query. See also [1] for an example.
Regards,
Timo
[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/table/sql.html#selecting-group-window-start-and-end-timestamps
Am 3/5/18 um 11:26 AM schrieb 杨力:
I tried to use write a nested query with HOP window in a streaming
environment.
Table `source` consists of 3 column, a, b, and timestamp.
SELECT a FROM (SELECT a, COUNT(*) FROM source GROUP BY HOP(timestamp,
..., ...), a, b) GROUP BY HOP(timestamp, ..., ...), a HAVING ...
And flink throws an exception of "Column 'timestamp' not found in any
table".
And I tried to "SELECT HOP_END(timestamp, ..., ...) AS timestamp, a,
COUNT(*)" in the inner query, getting an exception of "Window can only
be defined over a time attribute column."
Can I make the rowtime attribute propagating to the outer query, just
like chaining windows in DataStream API?
Regrads,
Bill