25 #ifndef QUERYENGINE_EXTENSIONFUNCTIONSWHITELIST_H
26 #define QUERYENGINE_EXTENSIONFUNCTIONSWHITELIST_H
29 #include <unordered_map>
30 #include <unordered_set>
82 const std::vector<ExtArgumentType>&
args,
86 const std::string
getName(
bool keep_suffix =
true)
const;
88 const std::vector<ExtArgumentType>&
getArgs()
const {
return args_; }
96 return (
name_.find(
"_cpu_",
name_.find(
"__")) == std::string::npos);
99 return (
name_.find(
"_gpu_",
name_.find(
"__")) == std::string::npos);
104 const std::vector<ExtArgumentType>
args_;
110 static void add(
const std::string& json_func_sigs);
112 static void addUdfs(
const std::string& json_func_sigs);
115 static void addRTUdfs(
const std::string& json_func_sigs);
117 static std::vector<ExtensionFunction>*
get(
const std::string&
name);
119 static std::vector<ExtensionFunction>*
get_udf(
const std::string&
name);
121 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name,
124 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name,
127 static std::vector<ExtensionFunction>
get_ext_funcs(
const std::string& name,
131 static std::string
toString(
const std::vector<ExtensionFunction>& ext_funcs,
132 std::string tab =
"");
133 static std::string
toString(
const std::vector<SQLTypeInfo>& arg_types);
134 static std::string
toString(
const std::vector<ExtArgumentType>& sig_types);
135 static std::string
toStringSQL(
const std::vector<ExtArgumentType>& sig_types);
140 const std::unordered_set<std::string>& udf_decls);
144 std::unordered_map<std::string, std::vector<ExtensionFunction>>& sigs,
145 const std::string& json_func_sigs);
149 static std::unordered_map<std::string, std::vector<ExtensionFunction>>
functions_;
151 static std::unordered_map<std::string, std::vector<ExtensionFunction>>
udf_functions_;
153 static std::unordered_map<std::string, std::vector<ExtensionFunction>>
159 #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
std::string toString(const ExtArgumentType &sig_type)
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)
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)
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)