Skip to content

[CALCITE-3000] Improve SqlUserDefinedFunction and SqlUserDefinedTable…#1176

Open
pengzhiwei2018 wants to merge 1 commit intoapache:mainfrom
pengzhiwei2018:dev_udf_operator
Open

[CALCITE-3000] Improve SqlUserDefinedFunction and SqlUserDefinedTable…#1176
pengzhiwei2018 wants to merge 1 commit intoapache:mainfrom
pengzhiwei2018:dev_udf_operator

Conversation

@pengzhiwei2018
Copy link

…Function to support overload method call

@pengzhiwei2018
Copy link
Author

pengzhiwei2018 commented Apr 20, 2019

This PR has improved SqlUserDefinedFunction & SqlUserDefinedTableFunction to support overload method call for both user-defined scalar function and table function.
Here is the mainly change list:
(1) Add SqlUtil#findBestMatchMethod to support find best matched method in the function class.
(2) Support dynamic type inference according to the calling argument types based on (1).(SqlFunction#getReturnTypeInferenceForClassSqlFunction#getOperandTypeInferenceForClass and SqlFunction#getOperandTypeCheckerForClass)
(3) Add argTypes and typeFactory parameters to ImplementableFunction#getImplementor to create CallImplementor according to the argument types.
(4) Add argTypes and typeFactory parameters to TableFunction#getRowType to infer return type according to the argument types.
(5) Add JavaScalarFunction and JavaTableFunction to represent the class-level function schema mapping a java class.

…Function to support overload method call

change fail message

fix test failed for different JDK

adjust param names
@danny0405 danny0405 force-pushed the master branch 2 times, most recently from 80f411d to ca27fe9 Compare November 30, 2019 07:52
@vlsi vlsi force-pushed the master branch 2 times, most recently from 49cb002 to 8768a23 Compare December 29, 2019 12:07
@julianhyde julianhyde force-pushed the main branch 2 times, most recently from 8a5cf83 to cf7f71b Compare June 8, 2023 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant