-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement window functions #103
Comments
related: apache/datafusion#4553 |
Looks like we already support the time window functions? @MichaelScofield |
@killme2008 last time I checked, window function in datafusion was lack of the filter clause support (see https://www.sqlite.org/windowfunctions.html). Will check it now. |
@killme2008 Unfortunately, datafusion still lack the support for "filter clause on window function". However, the filter could be partially substituted by plain "where" clause. See below the experiment I ran: First create table and insert data: CREATE TABLE hello(a bigint, b varchar(10), primary key(b));
INSERT INTO hello VALUES(1, 'one'), (1, 'two'), (1, 'three'), (2, 'four'), (3, 'five'), (3, 'six'); Run query with filter:
and using plain "where" to do filter:
Please note the difference between the output. Some rows are missing if using plain "where" to do the filter but the window function calculation is correct: sqlite
pg
mysql
greptimedb
Since the datafusion does support other window function features but this "filter clause", I'm claiming this issue is done. |
A lot of useful window functions are not implemented now.
Check how DataFusion supports defining these "User Defined Window Function" and implement them.
The text was updated successfully, but these errors were encountered: