kgyrtkirk opened a new issue, #15240:
URL: https://github.com/apache/druid/issues/15240

   ### Description
   
   For the query:
   ```
   select g,last_value(val) over (partition by g order by val) from t;
   ```
   is executed equivalently to
   ```
   select g,last_value(val) over (partition by g) from t;
   ```
   The result should take into account the rows up to the current `val` ; and 
not take the whole window
   
   http://sqlfiddle.com/#!17/7baabc/5
   
   <details>
   <summary>dataset</summary>
   
   ```sql
   create table t (g integer,val integer);
   insert into t values (1,1);
   insert into t values (2,1);
   insert into t values (2,1);
   insert into t values (2,2);
   insert into t values (3,1);
   insert into t values (3,2);
   insert into t values (3,3);
   ```
   </details>
   
   
   affects: `DrillWindowQueryTest#test_last_val_lastValFn_35` and some others
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to