Hi Gregory,
Rong's analysis is correct. The UNION with duplicate elimination is
translated into a UNION ALL and a subsequent grouping operator on all
attributes without an aggregation function.
Flink assumes that all grouping operators can produce retractions (updates)
and window-grouped aggregate
The SQL UNION is the reason here that's causing (a) the table is not append
only, and (b) the inner GroupBy.
If you check out the UNION operator[1], it suggests that: "Any duplicate
records are automatically removed unless UNION ALL is used".
So: (1) it is definitely not append-only operation as y
I'm trying to get a stream of data from a Table I've formed with roughly
this SQL:
SELECT
user_id,
count(msg),
HOP_END(rowtime, INTERVAL '1' second, INTERVAL '1' minute)
FROM (SELECT rowtime, user_id, action_name AS msg FROM
event_client_action
WHERE /* various clause