[
https://issues.apache.org/jira/browse/BEAM-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17484031#comment-17484031
]
Kyle Weaver commented on BEAM-13770:
------------------------------------
I tried adding a test for this based on the existing testOverRangeBoundedSum.
But I didn't get far. Simply adding a datetime field to the input data causes
planning to fail. It's unable to find a plan because of infinite cost, which
means our rules are not sufficient to fully translate the query for some reason.
https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/BeamAnalyticFunctionsTest.java#L213
> Support RANGE BETWEEN INTERVAL.
> -------------------------------
>
> Key: BEAM-13770
> URL: https://issues.apache.org/jira/browse/BEAM-13770
> Project: Beam
> Issue Type: New Feature
> Components: dsl-sql
> Reporter: Kyle Weaver
> Priority: P2
>
> Support RANGE BETWEEN INTERVAL syntax with analytic (over) functions.
> SELECT order_id, order_time, amount,
> SUM(amount) OVER (
> PARTITION BY product
> ORDER BY order_time
> RANGE BETWEEN INTERVAL '1' HOUR PRECEDING AND CURRENT ROW
> ) AS one_hour_prod_amount_sum
> FROM Orders
--
This message was sent by Atlassian Jira
(v8.20.1#820001)