Incorrect query result when using named window [CORE6460] #6693
Submitted by: @pavel-zotov
Reported by Vlad by e-mail:
Pavel Zotov found a bug with windows functions. I investigated it and seems found a reason.
recreate table emp_test (
insert into emp_test (emp_no, dept_no, salary) values ( 85, 'd01', 99999);
select e.emp_no, e.dept_no, e.salary,
Here values in the columns last_2 and last_w2 should be equal, also equal should be values at
EMP_NO DEPT_NO SALARY LAST_2 LAST_W2 LAST_3 LAST_W3 LAST_W4
You see - values at columns with explicit window definitions is OK, while columns with named windows
As I found, the bug is at WindowClause::dsqlPass:
it not uses clauses from "this" when creates new window (from base window "window" and current
and it works for me. Probably you have better idea.
The text was updated successfully, but these errors were encountered: