In certain situations, the use of the LEAD or LAG functions within the ORDER BY clause is not allowed

I found that, although Dremio 24.3 has addressed the issue of the LEAD and LAG functions not being able to set other offsets, problems arise when incorporating them into the ORDER BY statement. Please consider the following scenarios.


SELECT SUM("销售额") AS "销售额",LAG(SUM("销售额"),12) OVER (ORDER BY TO_CHAR("发货日期",'yyyy-mm')) AS "同环比",TO_CHAR("发货日期",'yyyy-mm') AS "发货日期1" FROM "@admin".test."orders" GROUP BY TO_CHAR("发货日期",'yyyy-mm') ORDER BY LAG(SUM("销售额"),12) OVER (ORDER BY TO_CHAR("发货日期",'yyyy-mm')), TO_CHAR(发货日期,'yyyy-mm') DESC LIMIT 2000


IllegalStateException: This generator does not support mappings beyond

parquet: (403.7 KB)

profile: (18.4 KB)

version:(update from 24.1)