Hi community,
For parameterize function, like 
public static class SubstringFunction extends ScalarFunction {
 
  private boolean endInclusive;
 
  public SubstringFunction(boolean endInclusive) {
    this.endInclusive = endInclusive;
  }
 
  public String eval(String s, Integer begin, Integer end) {
    return s.substring(begin, endInclusive ? end + 1 : end);
  }
}
we can register this function by pass function instance instead of function 
classes.
env.createTemporarySystemFunction("SubstringFunction", new 
SubstringFunction(true));
How to register or create this parameterize  function with 'CREATE FUNTION' 
statements.
With standard 'CREATE FUNCTION' statement in Flink doc.[1]
CREATE [TEMPORARY|TEMPORARY SYSTEM] FUNCTION 
  [IF NOT EXISTS] [catalog_name.][db_name.]function_name 
  AS identifier [LANGUAGE JAVA|SCALA|PYTHON]
We can only pass function_name in CREATE FUNCTION statement, is there way to 
pass function_instance ( parameterize function ) in this statement. 

[1]https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/table/sql/create/#create-function
 



1095193...@qq.com

Reply via email to