Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add a native function namespace manager #23358
base: master
Are you sure you want to change the base?
Add a native function namespace manager #23358
Changes from 1 commit
5eab56f
745c782
eeff0a5
35f7a48
3d9d985
4ca63ff
5567990
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think variableArity means that it can have a variable number of arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: understand this better. is there any sideeffect for the worker? will it be able to process aggregate as window function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about the sideeffect for the worker.
It doesn't seem to have a problem in processing aggregate as window functions.
Locally, I extended all the tests cases from
AbstractTestNativeWindowQueries
and all the test cases are passing.CC : @aditi-pandit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure of the context here... but all aggregate functions can be used as window functions in SQL queries. With this change seems like you are not building function metadata for aggregate functions as window functions from native side-car. So only pure window functions like rank, nth_value etc will appear as window functions from the side-car. Velox expects registration of each aggregate function as a window function in its registry. Does that not hold on the Presto Java side ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so for presto, i think any aggregate functions can be used as a window function, and we don't need to register it separately. Why doesn't this change break things for prestissimo window functions if we aren't registering them anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we are still registering prestissimo window functions, one such example is
cume_dist
which shows up in theSHOW FUNCTIONS
call.We aren't registering aggregate functions as window functions, so we are not building the function metadata for those. I think this works similar to how aggregate functions used as window functions work in Presto.
Whenever a SQL query has aggregate functions used as window functions, we still resolve the window function metadata(which is an aggregate function) as we would have handled the aggregate function, that's why the queries don't fail.