Limit in batch flink sql job

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

Limit in batch flink sql job

yinhua.dai
Why flink said "Limiting the result without sorting is not allowed as it
could lead to arbitrary results" when I use limit in batch mode?

SELECT * FROM csvSource limit 10;



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Limit in batch flink sql job

Fabian Hueske-2
Hi,

It's as the error message says.
LIMIT 10 without ORDER BY would pick 10 random rows and hence lead to non-deterministic results.
That's why it is not supported yet.

Best, Fabian

Am Di., 12. Feb. 2019 um 07:02 Uhr schrieb yinhua.dai <[hidden email]>:
Why flink said "Limiting the result without sorting is not allowed as it
could lead to arbitrary results" when I use limit in batch mode?

SELECT * FROM csvSource limit 10;



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Limit in batch flink sql job

yinhua.dai
OK, thanks.
It might be better to update the document which has the following example
that confused me.

SELECT *
FROM Orders
LIMIT 3



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Limit in batch flink sql job

Fabian Hueske-2
Thanks for pointing this out!
This is indeed a bug in the documentation.

I'll fix that.

Thank you,
Fabian

Am Mi., 13. Feb. 2019 um 02:04 Uhr schrieb yinhua.dai <[hidden email]>:
OK, thanks.
It might be better to update the document which has the following example
that confused me.

SELECT *
FROM Orders
LIMIT 3



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/