23 #ifndef QUERYENGINE_EXTENSIONFUNCTIONSWHITELIST_H
24 #define QUERYENGINE_EXTENSIONFUNCTIONSWHITELIST_H
27 #include <unordered_map>
28 #include <unordered_set>
130 const std::vector<ExtArgumentType>&
args,
132 const std::vector<std::map<std::string, std::string>>& annotations,
133 const bool is_runtime)
140 const std::string
getName(
bool keep_suffix =
true)
const;
154 return (
name_.find(
"_cpu_",
name_.find(
"__")) == std::string::npos);
158 return (
name_.find(
"_gpu_",
name_.find(
"__")) == std::string::npos);
165 const std::vector<ExtArgumentType>
args_;
173 static void add(
const std::string& json_func_sigs);
175 static void addUdfs(
const std::string& json_func_sigs);
178 static void addRTUdfs(
const std::string& json_func_sigs);
180 static std::vector<ExtensionFunction>*
get(
const std::string&
name);
182 static std::vector<ExtensionFunction>*
get_udf(
const std::string&
name);
184 static std::unordered_set<std::string>
get_udfs_name(
const bool is_runtime);
186 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name);
188 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name,
191 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name,
194 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name,
198 static std::string
toString(
const std::vector<ExtensionFunction>& ext_funcs,
199 std::string tab =
"");
200 static std::string
toString(
const std::vector<SQLTypeInfo>& arg_types);
201 static std::string
toString(
const std::vector<ExtArgumentType>& sig_types);
202 static std::string
toStringSQL(
const std::vector<ExtArgumentType>& sig_types);
207 const std::unordered_set<std::string>& udf_decls,
208 const bool is_gpu =
false);
212 std::unordered_map<std::string, std::vector<ExtensionFunction>>& sigs,
213 const std::string& json_func_sigs,
214 const bool is_runtime);
218 static std::unordered_map<std::string, std::vector<ExtensionFunction>>
functions_;
220 static std::unordered_map<std::string, std::vector<ExtensionFunction>>
udf_functions_;
222 static std::unordered_map<std::string, std::vector<ExtensionFunction>>
228 #endif // QUERYENGINE_EXTENSIONFUNCTIONSWHITELIST_H
static void addUdfs(const std::string &json_func_sigs)
static void addCommon(std::unordered_map< std::string, std::vector< ExtensionFunction >> &sigs, const std::string &json_func_sigs, const bool is_runtime)
static std::vector< ExtensionFunction > get_ext_funcs(const std::string &name)
static std::unordered_map< std::string, std::vector< ExtensionFunction > > udf_functions_
const ExtArgumentType getRet() const
static void clearRTUdfs()
std::string toSignature() const
static std::unordered_map< std::string, std::vector< ExtensionFunction > > rt_udf_functions_
const std::vector< ExtArgumentType > args_
static void add(const std::string &json_func_sigs)
Constants for Builtin SQL Types supported by HEAVY.AI.
const std::string getName(bool keep_suffix=true) const
std::string toStringSQL() const
std::string toString() const
static std::unordered_map< std::string, std::vector< ExtensionFunction > > functions_
static std::vector< ExtensionFunction > * get_udf(const std::string &name)
static std::unordered_set< std::string > get_udfs_name(const bool is_runtime)
std::string toString(const Executor::ExtModuleKinds &kind)
const std::vector< std::map< std::string, std::string > > annotations_
const std::vector< ExtArgumentType > & getInputArgs() const
const ExtArgumentType ret_
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")
ExtensionFunction(const std::string &name, const std::vector< ExtArgumentType > &args, const ExtArgumentType ret, const std::vector< std::map< std::string, std::string >> &annotations, const bool is_runtime)
const std::vector< std::map< std::string, std::string > > & getAnnotations() const
static std::vector< std::string > getLLVMDeclarations(const std::unordered_set< std::string > &udf_decls, const bool is_gpu=false)
SQLTypeInfo ext_arg_type_to_type_info(const ExtArgumentType ext_arg_type)
static std::string toStringSQL(const std::vector< ExtArgumentType > &sig_types)
static void addRTUdfs(const std::string &json_func_sigs)