flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Ewen <se...@apache.org>
Subject Re: Hi, question about orderBy two columns more
Date Mon, 02 Nov 2015 04:54:52 GMT
Actually, sortPartition(col1).sortPartition(col2) results in a single sort
that primarily sorts after col1 and secondarily sorts after col2, so it is
the same as in SQL when you state "ORDER BY col1, col2".

The SortPartitionOperator created with the first "sortPartition(col1)" call
appends further columns, rather than instantiating a new sort.

Greetings,
Stephan


On Sun, Nov 1, 2015 at 11:29 AM, Philip Lee <philjjoon@gmail.com> wrote:

> Hi,
>
> I know when applying order by col, it would be
> sortPartition(col).setParralism(1)
>
> What about orderBy two columns more?
> If the sql is to state order by col_1, col_2,  sortPartition().
> sortPartition () does not solve this SQL.
>
> because orderby in sql is to sort the fisrt coulmn and the second column
> in the sorted first column. but for flink the funtion totally sorts each
> column.
>
> Any suggestion?
>
> Thanks,
> phil
>
>

Mime
View raw message