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 =/
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?
Any resolution for this issue? Facing the same issue when I add a WHERE clause after ranking
I am using Dremio version 4.7
SELECT *
FROM
(SELECT temp_105118269707834.*,
rank()
OVER (
ORDER BY temp_105118269707834."total" DESC ) AS __rank
FROM temp_105118269707834 AS temp_105118269707834 ) t
WHERE t.__rank <= 3
ORDER BY t.__rank