Sql error SelectionVectorMode - filter result from window function

Hi!

I writed an SQL that have a row_number function, and then i wanna filter by this number. When i not filter its works, but when I add my_row_number_col = 3 for exemple, I recive a error.

"Something went wrong"
"Serialization is only allowed for SelectionVectorMode.NONE. This was in  SelectionVectorMode.TWO_BYTE"

my source is a postgres.

actuly, I’m having alot trouble with window function. This sql have 3 window fuction, but if all three are in the same select, I recive an erro too. So a “split” into 3 subqueries and each one do one window function. But its not de case xD.

where ex SQL example:

select
   *
from(
   select
       row_number() over (partition by tb1.one_column order by tb1.other_column) as my_number,
       *
   from(
       .....SQL SQL and SQL......
    ) tb1
) tb2   
where
    tb2.my_number = 3

if I remove the tb2.my_number = 3, then it’s work, but I need filter =/

Can some one help me?

Hello @geovanif,

This appears to be an example of a known bug that we’ve identified. Can you please attach the profiles for the successful query and for the unsuccessful profile?

1 Like

I can’t response you from that other account. acctualy I cant response any post =’[

1fed3122-c2eb-43f4-b5a7-2416ec5afd75-success.zip (24,7,KB) 53033934-655b-4081-b986-2a29a7f8afbe-error.zip (24,7,KB)

1fed3122-c2eb-43f4-b5a7-2416ec5afd75-success.zip (24,7,KB) 53033934-655b-4081-b986-2a29a7f8afbe-error.zip (24,7,KB)