[CALCITE-4564] Initialization context for non-static user-defined functions (UDFs)#2395
Closed
julianhyde wants to merge 7 commits intoapache:masterfrom
Closed
[CALCITE-4564] Initialization context for non-static user-defined functions (UDFs)#2395julianhyde wants to merge 7 commits intoapache:masterfrom
julianhyde wants to merge 7 commits intoapache:masterfrom
Conversation
…ed functions (UDFs) When Interpreter calls a UDF, invoke its constructor only once.
In InterpreterTest, allow more than one query to be executed per test method. FunctionContext for user-defined aggregated functions doesn't quite work yet.
julianhyde
added a commit
to julianhyde/calcite
that referenced
this pull request
Apr 19, 2021
…ctions (UDFs) When Interpreter or code generated by RexToLixTranslator calls a UDF, invoke its constructor only once. There will therefore be one instance of the UDF for the whole execution, and that instance can be used to store state. Typical state will be preparation work (e.g. compiling a regular expression) to make each invocation faster. Add 'interface FunctionContext' (marked as experimental). If a UDF has a public constructor with FunctionContext as a parameter, this will be called in preference to the default constructor. In InterpreterTest, allow more than one query to be executed per test method. Close apache#2395
julianhyde
added a commit
to julianhyde/calcite
that referenced
this pull request
Apr 19, 2021
…ctions (UDFs) When Interpreter or code generated by RexToLixTranslator calls a UDF, invoke its constructor only once. There will therefore be one instance of the UDF for the whole execution, and that instance can be used to store state. Typical state will be preparation work (e.g. compiling a regular expression) to make each invocation faster. Add 'interface FunctionContext' (marked as experimental). If a UDF has a public constructor with FunctionContext as a parameter, this will be called in preference to the default constructor. In InterpreterTest, allow more than one query to be executed per test method. Close apache#2395
Contributor
Author
|
Merged as b2e9e6c. |
XuQianJin-Stars
pushed a commit
to XuQianJin-Stars/calcite
that referenced
this pull request
Jul 14, 2021
…ctions (UDFs) When Interpreter or code generated by RexToLixTranslator calls a UDF, invoke its constructor only once. There will therefore be one instance of the UDF for the whole execution, and that instance can be used to store state. Typical state will be preparation work (e.g. compiling a regular expression) to make each invocation faster. Add 'interface FunctionContext' (marked as experimental). If a UDF has a public constructor with FunctionContext as a parameter, this will be called in preference to the default constructor. In InterpreterTest, allow more than one query to be executed per test method. Close apache#2395
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I would appreciate a review, but reviewing the lines of code (which is what GitHub PRs seem to encourage) is the least useful. I would prefer feedback on the specification (how users would use this feature) and design. Therefore please leave comments at https://issues.apache.org/jira/browse/CALCITE-4564; or log JIRA cases for follow-up work.