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
Support User Defined Table Function #8306
Support User Defined Table Function #8306
Changes from 4 commits
32ecce4
2f4e089
7a85a43
1fe0c8b
169b13e
2df01db
180e02e
c2e7cb0
0e98c0b
ccc2959
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.
This API is nice and is as specified in #7926. I think it will work for using a table function as a relation in the query (aka like a table with parameters)
The one thing I don't think this API supports is TableFunctions that take other arguments (aka that are fed the result of a table / can use the value of correlated subqueries as mentioned by @yukkit and @Jesse-Bakker #7926 (comment).
I can think of two options:
I personally prefer 1 as I think it offers several additional use cases, even though it doesn't cover "take a table input".
Any other thoughts?
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.
One specific use case for table-valued arguments to table-valued functions is, for example windowing tvf's like in apache flink.
Example which cannot be expressed by taking
Expr
arguments (maybe ifExpr::Row()
is added?):That can also be emulated, however, using something like:
which doesn't need table-valued arguments (but does need to resolve
Expr::Column(name=bidtime)
. I'm not sure if the current API can do that?).Anyway, the current API is nice, and definitely very useful 👍
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.
👍