You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by "yinhua.dai" <yi...@outlook.com> on 2019/02/12 06:01:57 UTC

Limit in batch flink sql job

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/

Re: Limit in batch flink sql job

Posted by Fabian Hueske <fh...@gmail.com>.
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 <
yinhua.2018@outlook.com>:

> 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/
>

Re: Limit in batch flink sql job

Posted by "yinhua.dai" <yi...@outlook.com>.
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/

Re: Limit in batch flink sql job

Posted by Fabian Hueske <fh...@gmail.com>.
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 <
yinhua.2018@outlook.com>:

> 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/
>