You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by Renjie Liu <li...@gmail.com> on 2022/12/01 03:16:17 UTC

FW: Why streaming over agg not supporting ranged upper boundary?


From: Renjie Liu <li...@gmail.com>
Date: Tuesday, November 1, 2022 at 15:13
To: user@flink.apache.org <us...@flink.apache.org>
Subject: Why streaming over agg not supporting ranged upper boundary?
Hi, flink community:

Per the doc here https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/dev/table/sql/queries/over-agg/#range-definitions

Flink streaming over agg only supports current row as upper boundary. I can understand it’s impossible to support unlimited upper boundary, but I don’t know why we can’t support ranges upper boundary? For example I believe following sql is reasonable:

SELECT order_id, order_time, amount,
  SUM(amount) OVER (
    PARTITION BY product
    ORDER BY order_time
    RANGE BETWEEN INTERVAL '1' HOUR PRECEDING AND INTERVAL '1' HOUR AFTER ) AS one_hour_prod_amount_sum
FROM Orders