Ignite自定义函数注意事项
Ignite自定义函数注意事项 Customer SQL Function首先,需要写自定义SQL函数的java类。 注意:1. 定义函数的方法必须是静态的static修饰。 2. 自定义函数的方法不能重载。 3. 每个方法必须要用@QuerySqlFunction注释。 4.当有多个自定义方法时,不能同时在@QuerySqlFunction(alias=’XXX’)中定义别名。 5. 使用setSqlfunction(‘xxx.class’)注册函数的时候,不能同时注册两个class,如果需要自定义多个函数可以在一个类中定义多个方法。 示例如下:import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date; import org.apache.ignite.cache.query.annotations.QuerySqlFunction; public class addition2{ public static final String DATE_TIME_PATTER...