Re: About the retract of the calculation result of flink sql

2018-10-01 Thread Hequn Cheng
Hi clay, Keyed group by: > SELECT a, SUM(b) as d > FROM Orders > GROUP BY a Non Keyed group by: > SELECT SUM(b) as d > FROM Orders I would like to look into the problem. However, I can't find obvious problems from the sql. It would be great that can provide a minimal example to reproduce

Re: About the retract of the calculation result of flink sql

2018-10-01 Thread Fabian Hueske
Hi Clay, If you do env.setParallelism(1), the query won't be executed in parallel. However, looking at your screenshot the message order does not seem to be the problem here (given that you printed the content of the topic). Are you sure that it is not possible that the result decreases if some

Re: About the retract of the calculation result of flink sql

2018-10-01 Thread clay4444
hi,Timo I use env.setParallelism(1) in my code, I set the overall degree of parallelism of the program to 1, so that some calculations will still be parallelized? clay, -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: About the retract of the calculation result of flink sql

2018-10-01 Thread clay4444
hi,Hequn I don't understand you about the group by and non-keyed group by. Can you explain it in a little more detail, or give me an example, thank u . clay, -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: About the retract of the calculation result of flink sql

2018-10-01 Thread Timo Walther
Hi, you also need to keep the parallelism in mind. If your downstream operator or sink has a parallelism of 1 and your SQL query pipeline has a higher parallelism, the retract results are rebalanced and arrive in a wrong order. For example, if you view the changelog in SQL Client, the

Re: About the retract of the calculation result of flink sql

2018-09-29 Thread Hequn Cheng
Hi clay, Are there any other lines after the last line in your picture? The final result should be eventual consistency and correct. In your sql, there is a left join, a keyed group by and a non-keyed group by. Both of the left join and keyed group by will send retractions to the downstream

Re: About the retract of the calculation result of flink sql

2018-09-29 Thread clay4444
My final calculation result is implemented in the following way when writing to kafka, because KafkaTableSink does not support retract mode, I am not sure whether this method will affect the calculation result. val userTest: Table = tEnv.sqlQuery(sql) val endStream =

About the retract of the calculation result of flink sql

2018-09-29 Thread clay4444
Hi everyone, I am having some problems in the process of using flink sql, my sql is as follows: SELECT COUNT(DISTINCT mm.student_id),sum(price) FROM ( SELECT a.student_id,a.confirm_date_time,sum(a.real_total_price)as price FROM ( SELECT DISTINCT po.id as order_id ,po.student_id ,po.create_id