Re: Window function support on SQL

2017-12-05 Thread Fabian Hueske
Hi Tao, computing a group window requires that the event-time timestamp of the DataStream is exposed as a time attribute (in your case as an event time attribute). If you register DataStream at the TableEnvironment, this has to be done in two steps: 1) assign timestamps and watermarks to the Data

Re: Window function support on SQL

2017-12-04 Thread Tao Xia
Thanks for the quick response Fabian I have DataStream of avro objects. Not sure how to add a TIMESTAMP attribute or convert the event_timestramp field to Timestamp Attribute for my SQL use cases. Most docs only covers the Table API with static schema. p.s. my Avro schema has 100+ fields. Can yo

Re: Window function support on SQL

2017-12-04 Thread Fabian Hueske
Hi, yes, Apache Calcite's group window functions are supported. The error message tells you that the attribute event_timestamp should be of type DATETIME (or TIMESTAMP) and not BIGINT. Please check the documentation for details [1]. Best, Fabian [1] https://ci.apache.org/projects/flink/flink-do

Window function support on SQL

2017-12-04 Thread Tao Xia
Hi All, Do you know if window function supported on SQL yet? I got the error message when trying to use group function in SQL. My query below: val query = "SELECT nd_key, concept_rank, event_timestamp FROM "+streamName + " GROUP BY TUMBLE(event_timestamp, INTERVAL '1' HOUR), nd_key" Error M