Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-11-02 Thread Fabian Hueske
P-11 > provides > > a > > > >> way > > > >>>> to define such a query as a sliding row window with unbounded > > > preceding > > > >>>> rows. With the upcoming SQL proposal, queries that consume > unbounded > > > >> mem

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-11-01 Thread Sean Wang
gt; would > > >>>> need to extend the parser quite a bit because windows would need to > be > > >>>> defined as Strings and not via objects. > > >>>> > > >>>> - RowWindows: The rowWindow() call mimics the standard SQL WINDOW >

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-28 Thread Fabian Hueske
> think we can make the over() call mandatory to have the windowing more > >>>> explicit. It should also be possible to extend the over clause to > >> directly > >>>> accept RowWindows instead of window aliases. I would not make this a > >>>> prio

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-28 Thread Jark Wu
stion: >>>> In FLIP-11, groupBy() is used to define the partitioning of RowWindows. >>>> I think this should be changed to partitionBy() because groupBy() groups >>>> data and applies an aggregation to all rows of a group which is not >>>> happening here. In ori

Re: 答复: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-26 Thread Stephan Ewen
er() for rowWindow() with a single window definition > >> - additionally allowing window definitions in over() > >> - using partitionBy() instead of groupBy() for row windows? > >> > >> Best, Fabian > >> > >> 2016-10-13 11:10 GMT+02:00 Zhangruc

Re: 答复: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-14 Thread Fabian Hueske
vironment.getTableEnvironment(env) >>> val ds: DataStream[(String,Long, Long)] = env.readTextFile("/home/demo") >>> tblEnv.registerDataStream("Order", ds, 'userID, 'count, 'num) >>> .map(f=>(f, 1L, 1L)) >>> val sql = tb

Re: 答复: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-14 Thread Sean Wang
num) >> .map(f=>(f, 1L, 1L)) >> val sql = tblEnv.sql("SELECT Stream * FROM Order WHERE userID='A'") >> >> So in my opinion, the grammar which is marked red should be compatible >> with calcite's StreamSQL grammar. >> >> By the w

Re: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-14 Thread Timo Walther
ue...@gmail.com] 发送时间: 2016年10月13日 18:17 收件人: dev@flink.apache.org 抄送: Sean Wang; Timo Walther 主题: Re: 答复: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations Hi Zhangrucong, yes, we want to use Calcite's SQL parser including its window syntax, i.e., - the standard SQL OVER windows (i

re: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-13 Thread Zhangrucong
Wang; Timo Walther 主题: Re: 答复: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations Hi Zhangrucong, yes, we want to use Calcite's SQL parser including its window syntax, i.e., - the standard SQL OVER windows (in streaming with a few restriction such as no different partitionings or orders)

Re: 答复: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-13 Thread Fabian Hueske
quot;) >> >> So in my opinion, the grammar which is marked red should be compatible >> with calcite's StreamSQL grammar. >> >> By the way, thanks very much for telling me the modified content in >> Flink StreamSQL. I will look the new proposal . >> >> Thanks!

Re: 答复: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-13 Thread Fabian Hueske
he grammar which is marked red should be compatible > with calcite's StreamSQL grammar. > > By the way, thanks very much for telling me the modified content in Flink > StreamSQL. I will look the new proposal . > > Thanks! > 发件人: Sean Wang [mailto:wshaox...@gmail.com] >

答复: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-13 Thread Zhangrucong
product AS ( ORDER BY rowtime PARTITION BY productId)) Thanks! -----邮件原件----- 发件人: 王绍翾(大沙) [mailto:shaoxuan@alibaba-inc.com<mailto:shaoxuan@alibaba-inc.com>] 发送时间: 2016年10月13日 2:03 收件人: dev@flink.apache.org<mailto:dev@flink.apache.org> 主题: RE:[DISCUSS] FLIP-11: Ta

Re: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-13 Thread Sean Wang
duct AS ( > ORDER BY rowtime > PARTITION BY productId)) > > > > Thanks! > > -邮件原件- > 发件人: 王绍翾(大沙) [mailto:shaoxuan@alibaba-inc.com] > 发送时间: 2016年10月13日 2:03 > 收件人: dev@flink.apache.org > 主题: RE:[DISCUSS] FLIP-11: Table API Stream Aggregatio

Re: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-12 Thread Zhangrucong
TITION BY productId)) Thanks! -邮件原件- 发件人: 王绍翾(大沙) [mailto:shaoxuan....@alibaba-inc.com] 发送时间: 2016年10月13日 2:03 收件人: dev@flink.apache.org 主题: RE:[DISCUSS] FLIP-11: Table API Stream Aggregations Hi Fabian, Timo, and Jark.Thanks for kicking off this FLIP. This is a really great and promising pr

RE:[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-10-12 Thread 王绍翾(大沙)
-发件人:Fabian Hueske 发送时间:2016年9月26日(星期一) 21:13收件人:dev@flink.apache.org 主 题:Re: [DISCUSS] FLIP-11: Table API Stream Aggregations Hi everybody, Timo proposed our FLIP-11 a bit more than three weeks ago. I will update the status of the FLIP to accepted. Thanks, Fabian 2016-09-19 9:16 GMT

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-09-26 Thread Fabian Hueske
Hi everybody, Timo proposed our FLIP-11 a bit more than three weeks ago. I will update the status of the FLIP to accepted. Thanks, Fabian 2016-09-19 9:16 GMT+02:00 Timo Walther : > Hi Jark, > > yes I think enough time has passed. We can start implementing the changes. > What do you think Fabian

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-09-19 Thread Timo Walther
Hi Jark, yes I think enough time has passed. We can start implementing the changes. What do you think Fabian? If there are no objections, I will create the subtasks in Jira today. For FLIP-11/1 I already have implemented a prototype, I just have to do some refactoring/documentation before op

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-09-17 Thread Jark Wu
Hi all, It seems that there’s no objections to the window design. So could we open subtasks to start working on it now ? - Jark Wu > 在 2016年9月7日,下午4:29,Jark Wu 写道: > > Hi Fabian, > > Thanks for sharing your ideas. > > They all make sense to me. Regarding to reassigning timestamp, I do no

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-09-07 Thread Jark Wu
Hi Fabian, Thanks for sharing your ideas. They all make sense to me. Regarding to reassigning timestamp, I do not have an use case. I come up with this because DataStream has a TimestampAssigner :) +1 for this FLIP. - Jark Wu > 在 2016年9月7日,下午2:59,Fabian Hueske 写道: > > Hi, > > thanks fo

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-09-06 Thread Fabian Hueske
Hi, thanks for your comments and questions! Actually, you are bringing up the points that Timo and I discussed the most when designing the FLIP ;-) - We also thought about the syntactic shortcut for running aggregates like you proposed (table.groupBy(‘a).select(…)). Our motivation to not allow th

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-09-06 Thread Jark Wu
Hi all, I'm on vacation for about five days , sorry to have missed this great FLIP. Yes, the non-windowed aggregates is a special case of row-window. And the proposal looks really good. Can we have a simplified form for the special case? Such as : table.groupBy(‘a).rowWindow(SlideRows.unbound

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-09-06 Thread Timo Walther
Hi all, I thought about the API of the FLIP again. If we allow the "systemtime" attribute, we cannot implement a nice method chaining where the user can define a "allowLateness" only on event time. So even if the user expressed that "systemtime" is used we have to offer a "allowLateness" meth

Re: [DISCUSS] FLIP-11: Table API Stream Aggregations

2016-09-05 Thread Fabian Hueske
Hi Jark, you had asked for non-windowed aggregates in the Table API a few times. FLIP-11 proposes row-window aggregates which are a generalization of running aggregates (SlideRow unboundedPreceding). Can you have a look at the FLIP and give feedback whether this is what you are looking for? Impro

[DISCUSS] FLIP-11: Table API Stream Aggregations

2016-09-01 Thread Timo Walther
Hi all! Fabian and I worked on a FLIP for Stream Aggregations in the Table API. You can find the FLIP-11 here: https://cwiki.apache.org/confluence/display/FLINK/FLIP-11%3A+Table+API+Stream+Aggregations Motivation for the FLIP: The Table API is a declarative API to define queries on static an