Expected sql is like this:
```
select x1.col1, x1.col2, x1.col4, 
    avg(x1.col4) over (partition by x1.col1 order by x1.col1 asc, x1.col4 asc)
from TAB_Window_func x1
```

Seems the codes you provided can't generate it.

No, the syntax I's using is not good enough. Let's continue the discussion on your next conversation.