Timezone offset on daily time window grouping using SQL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Timezone offset on daily time window grouping using SQL

李玥
Hello team,
        In DataStream API , a time offset can be specified like this:

input
.keyBy(<key selector>)
.window(TumblingEventTimeWindows.of(Time.days(1), Time.hours(-8)))

Is their any way to specify a time offset on SQL?
My sql looks like:

SELECT * from table
GROUP BY TUMBLE(`timestamp`,INTERVAL '1’ DAY)

Thanks !
LiYue
tig.jd.com
Reply | Threaded
Open this post in threaded view
|

Re: Timezone offset on daily time window grouping using SQL

Fabian Hueske-2
Hi,

Calcite's parser supports this syntax TUMBLE(zzzzz, INTERVAL '0.004' SECOND, TIME '08:00:00') but unfortunately, Flink SQL doesn't support it yet.

Best, Fabian

2018-03-19 4:45 GMT+01:00 LiYue <[hidden email]>:
Hello team,
        In DataStream API , a time offset can be specified like this:

input
.keyBy(<key selector>)
.window(TumblingEventTimeWindows.of(Time.days(1), Time.hours(-8)))

Is their any way to specify a time offset on SQL?
My sql looks like:

SELECT * from table
GROUP BY TUMBLE(`timestamp`,INTERVAL '1’ DAY)

Thanks !
LiYue
tig.jd.com

Reply | Threaded
Open this post in threaded view
|

Re: Timezone offset on daily time window grouping using SQL

李玥
Hi,
Thanks for the tip.
My team will try to read flink table source code and maybe we clould contribute later.


在 2018年3月19日,下午6:06,Fabian Hueske <[hidden email]> 写道:

Hi,

Calcite's parser supports this syntax TUMBLE(zzzzz, INTERVAL '0.004' SECOND, TIME '08:00:00') but unfortunately, Flink SQL doesn't support it yet.

Best, Fabian

2018-03-19 4:45 GMT+01:00 LiYue <[hidden email]>:
Hello team,
        In DataStream API , a time offset can be specified like this:

input
.keyBy(<key selector>)
.window(TumblingEventTimeWindows.of(Time.days(1), Time.hours(-8)))

Is their any way to specify a time offset on SQL?
My sql looks like:

SELECT * from table
GROUP BY TUMBLE(`timestamp`,INTERVAL '1’ DAY)

Thanks !
LiYue
tig.jd.com