feat: bind Greptime's own UDF&UDAF into Python Coprocessor Module (#335)

* feat: port own UDF&UDAF into py copr(untest yet)

* refactor: move UDF&UDAF to greptime_builtins

* feat: support List in val2py_obj

* test: some testcases for newly added UDFs

* test: complete test for all added gpdb's own UDF

* refactor: add underscore for long func name

* feat: better error message

* fix: typo
This commit is contained in:
discord9
2022-11-04 15:49:41 +08:00
committed by GitHub
parent bc701d3e7f
commit 3d195ff858
4 changed files with 362 additions and 17 deletions

View File

@@ -31,6 +31,10 @@ impl FunctionRegistry {
.insert(func.name(), func);
}
pub fn get_aggr_function(&self, name: &str) -> Option<AggregateFunctionMetaRef> {
self.aggregate_functions.read().unwrap().get(name).cloned()
}
pub fn get_function(&self, name: &str) -> Option<FunctionRef> {
self.functions.read().unwrap().get(name).cloned()
}