25 #ifndef QUERYENGINE_EXTENSIONFUNCTIONSWHITELIST_H
26 #define QUERYENGINE_EXTENSIONFUNCTIONSWHITELIST_H
29 #include <unordered_map>
30 #include <unordered_set>
94 const std::vector<ExtArgumentType>&
args,
98 const std::string
getName(
bool keep_suffix =
true)
const;
108 return (
name_.find(
"_cpu_",
name_.find(
"__")) == std::string::npos);
111 return (
name_.find(
"_gpu_",
name_.find(
"__")) == std::string::npos);
116 const std::vector<ExtArgumentType>
args_;
122 static void add(
const std::string& json_func_sigs);
124 static void addUdfs(
const std::string& json_func_sigs);
127 static void addRTUdfs(
const std::string& json_func_sigs);
129 static std::vector<ExtensionFunction>*
get(
const std::string&
name);
131 static std::vector<ExtensionFunction>*
get_udf(
const std::string&
name);
133 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name,
136 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name,
139 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name,
143 static std::string
toString(
const std::vector<ExtensionFunction>& ext_funcs,
144 std::string tab =
"");
145 static std::string
toString(
const std::vector<SQLTypeInfo>& arg_types);
146 static std::string
toString(
const std::vector<ExtArgumentType>& sig_types);
147 static std::string
toStringSQL(
const std::vector<ExtArgumentType>& sig_types);
152 const std::unordered_set<std::string>& udf_decls,
153 const bool is_gpu =
false);
157 std::unordered_map<std::string, std::vector<ExtensionFunction>>& sigs,
158 const std::string& json_func_sigs);
162 static std::unordered_map<std::string, std::vector<ExtensionFunction>>
functions_;
164 static std::unordered_map<std::string, std::vector<ExtensionFunction>>
udf_functions_;
166 static std::unordered_map<std::string, std::vector<ExtensionFunction>>
172 #endif // QUERYENGINE_EXTENSIONFUNCTIONSWHITELIST_H
static std::vector< ExtensionFunction > get_ext_funcs(const std::string &name, const bool is_gpu)
static void addUdfs(const std::string &json_func_sigs)
const std::vector< ExtArgumentType > & getArgs() const
static std::unordered_map< std::string, std::vector< ExtensionFunction > > udf_functions_
const ExtArgumentType getRet() const
static void clearRTUdfs()
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 OmniSci.
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)
ExtensionFunction(const std::string &name, const std::vector< ExtArgumentType > &args, const ExtArgumentType ret)
std::string toString(const Executor::ExtModuleKinds &kind)
static void addCommon(std::unordered_map< std::string, std::vector< ExtensionFunction >> &sigs, const std::string &json_func_sigs)
const std::vector< ExtArgumentType > & getInputArgs() const
const ExtArgumentType ret_
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")
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)