[ https://issues.apache.org/jira/browse/FLINK-29066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aitozi updated FLINK-29066: --------------------------- Description: I found a bit confused when implementing the inner built in functions when dealing with the runtime property. Currently, it has three types of the runtime property: 1) runtimeclass which means flink provide a class to define the runtime implementation 2) runtimeProvider which means the runtime class is code generated 3) runtimeDefered which means it will use the calcite's sql operator to mapping the codegen After some research, I found that we have 4 situations to deal: 1) non new stack operators eg: {{LOG10}} 2) new stack with own runtime class provided. eg: {{IFNULL}} -> runtimeClass 3) new stack translate to sql operator to provide runtime call gen. eg:{{IS_NOT_TRUE}} -> runtimeDefered 4) new stack can not mapping to calcite's operator (mainly flink internal functions) without runtime class need mapping to the runtime callgen. eg: {{CURRENT_WATERMARK}}. -> runtimeProvided was: Currently, it has three types of the runtime property: 1) runtimeclass which means flink provide a class to define the runtime implementation 2) runtimeProvider which means the runtime class is code generated 3) runtimeDefered which means it will use the calcite's inner function to handle. First, the runtimeDefered is only a mark interface, have no actual effect, and the JSON_Xx functions already port to the flink internal stack, so I think it can be removed now / changed to the runtime provider. Besides, I found that some functions do not mark the runtime property, which also use the (runtimeProvider effect eg: {{and}} ). So I think the property is not such accurate here > Reconsider the runtime property of the BuiltInFunctionDefinition > ---------------------------------------------------------------- > > Key: FLINK-29066 > URL: https://issues.apache.org/jira/browse/FLINK-29066 > Project: Flink > Issue Type: Improvement > Components: Table SQL / Planner > Reporter: Aitozi > Priority: Major > Labels: pull-request-available > > I found a bit confused when implementing the inner built in functions when > dealing with the runtime property. Currently, it has three types of the > runtime property: > 1) runtimeclass which means flink provide a class to define the runtime > implementation > 2) runtimeProvider which means the runtime class is code generated > 3) runtimeDefered which means it will use the calcite's sql operator to > mapping the codegen > After some research, I found that we have 4 situations to deal: > 1) non new stack operators eg: {{LOG10}} > 2) new stack with own runtime class provided. eg: {{IFNULL}} -> runtimeClass > 3) new stack translate to sql operator to provide runtime call gen. > eg:{{IS_NOT_TRUE}} -> runtimeDefered > 4) new stack can not mapping to calcite's operator (mainly flink internal > functions) without runtime class need mapping to the runtime callgen. eg: > {{CURRENT_WATERMARK}}. -> runtimeProvided -- This message was sent by Atlassian Jira (v8.20.10#820010)