What limits Dremio "Lead" only support offset 1?

#1

UnsupportedOperatorsVisitor.java

if i wanna support offset bigger than 1, where can i start?
any advice, Thanks!

#2

Hi @jerryldh,

Can you provide a profile for the query where you encounter this. Can you give more context?

#3

@ben


this is snapshot of my table,
when i query "SELECT id,name,age,lead(id,1) OVER (PARTITION BY DEPARTMENT_ID) "
for “lead” function, offset only support “1”,
result:~CT%EF%BF%BD_%60TX87Q%7D%EF%BF%BDGDNJ8S
if i query “SELECT id,name,age,lead(id,2) OVER (PARTITION BY DEPARTMENT_ID)”, same result returns.
i wanna know how can i fix this.
in source code “UnsupportedOperatorsVisitor.java”, i find that “we don’t support offset != 1”. so where should i start to support other offset value?

Thanks!

#4

another issue
as you can see in picture above,
some values missd,
for EXPR$3 values should be “2,1,4,3,5,NULL”
but returns “2,NULL,4,3,NULL,NULL”.
i’m not sure if it’s caused by a bug or other reason.