pinot icon indicating copy to clipboard operation
pinot copied to clipboard

LEAD and LAG window functions not functioning as expected in version 1.1.0

Open francescomultari opened this issue 1 year ago • 2 comments

Description It has been observed that the LEAD and LAG window functions are not producing the expected results when used in our SQL queries. These functions are intended to access data from subsequent or preceding rows within the same result set, but they appear to be accepted among the windows functions

Steps to Reproduce Use the LEAD or LAG window functions in a SQL query. Compare the output with the expected results.

Expected Behavior The LEAD function should return the value from the next row, and the LAG function should return the value from the previous row, as per their functionality.

Actual Behavior Used the following query:

select id,name, LEAD(name,1) OVER (ORDER BY x) from table limit 10

Error obtained when using LEAD or LAG functions

image image

francescomultari avatar Jun 21 '24 07:06 francescomultari

@xiangfu0 is this fixed?

Jackie-Jiang avatar Jun 24 '24 18:06 Jackie-Jiang

Looks like this should be fixed by https://github.com/apache/pinot/pull/12878 in the upcoming Pinot 1.2.0 release. @francescomultari you can verify by running Pinot from the latest master branch (https://github.com/apache/pinot?tab=readme-ov-file#building-pinot).

yashmayya avatar Jul 02 '24 06:07 yashmayya