Add getValueFn and removeFn to properties (#3782)

This commit is contained in:
HangyuanLiu
2020-06-06 11:34:32 +08:00
committed by GitHub
parent 0f6e74f3f9
commit 4cbce687b7

View File

@ -464,6 +464,14 @@ public class AggregateFunction extends Function {
properties.put(CreateFunctionStmt.MERGE_KEY, mergeFnSymbol);
properties.put(CreateFunctionStmt.SERIALIZE_KEY, serializeFnSymbol);
properties.put(CreateFunctionStmt.FINALIZE_KEY, finalizeFnSymbol);
//getValueFn and removeFn may be null if not analytic agg
if (getValueFnSymbol != null) {
properties.put(CreateFunctionStmt.GET_VALUE_KEY, getValueFnSymbol);
}
if (removeFnSymbol != null) {
properties.put(CreateFunctionStmt.REMOVE_KEY, removeFnSymbol);
}
return new Gson().toJson(properties);
}
}