calcite 自定义聚合函数写法

参考 http://blog.51cto.com/1196740/2160570

使用calcite校验sql语句,注册自定义聚合函数时,只关心方法列表,如一个sum函数的class可定义为如下

public class SumFunction {
        
        public SumFunction init() {
            return null;
        }
        
        public SumFunction add(SumFunction a, int x) {
            return null;
        }
        
        public int result(SumFunction a) {
            return 0;
        }
    }

猜你喜欢

转载自www.cnblogs.com/gradyyang/p/10398889.html