OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExtensionFunctionsWhitelist.cpp File Reference
#include "QueryEngine/ExtensionFunctionsWhitelist.h"
#include <boost/algorithm/string/join.hpp>
#include <iostream>
#include "QueryEngine/JsonAccessors.h"
#include "QueryEngine/TableFunctions/TableFunctionsFactory.h"
#include "Shared/StringTransform.h"
+ Include dependency graph for ExtensionFunctionsWhitelist.cpp:

Go to the source code of this file.

Namespaces

 anonymous_namespace{ExtensionFunctionsWhitelist.cpp}
 

Typedefs

using SignatureMap = std::unordered_map< std::string, std::vector< ExtensionFunction >>
 

Functions

std::string anonymous_namespace{ExtensionFunctionsWhitelist.cpp}::serialize_type (const ExtArgumentType type)
 
SQLTypeInfo ext_arg_type_to_type_info (const ExtArgumentType ext_arg_type)
 
ExtArgumentType anonymous_namespace{ExtensionFunctionsWhitelist.cpp}::deserialize_type (const std::string &type_name)
 
std::string anonymous_namespace{ExtensionFunctionsWhitelist.cpp}::drop_suffix (const std::string &str)
 

Typedef Documentation

using SignatureMap = std::unordered_map<std::string, std::vector<ExtensionFunction>>

Definition at line 376 of file ExtensionFunctionsWhitelist.cpp.

Function Documentation

SQLTypeInfo ext_arg_type_to_type_info ( const ExtArgumentType  ext_arg_type)

Definition at line 176 of file ExtensionFunctionsWhitelist.cpp.

References Bool, Double, Float, Int16, Int32, Int64, Int8, kBIGINT, kBOOLEAN, kDOUBLE, kFLOAT, kINT, kNULLT, kSMALLINT, kTINYINT, LOG, anonymous_namespace{ExtensionFunctionsWhitelist.cpp}::serialize_type(), and logger::WARNING.

Referenced by bind_function(), ExtensionFunctionsWhitelist::get_ext_funcs(), and RelAlgTranslator::translateFunction().

176  {
177  /* This function is mostly used for scalar types.
178  For non-scalar types, NULL is returned as a placeholder.
179  */
180  switch (ext_arg_type) {
182  return SQLTypeInfo(kBOOLEAN, false);
184  return SQLTypeInfo(kTINYINT, false);
186  return SQLTypeInfo(kSMALLINT, false);
188  return SQLTypeInfo(kINT, false);
190  return SQLTypeInfo(kBIGINT, false);
192  return SQLTypeInfo(kFLOAT, false);
194  return SQLTypeInfo(kDOUBLE, false);
195  default:
196  LOG(WARNING) << "ExtArgumentType `" << serialize_type(ext_arg_type)
197  << "` cannot be converted to SQLTypeInfo. Returning nulltype.";
198  }
199  return SQLTypeInfo(kNULLT, false);
200 }
#define LOG(tag)
Definition: Logger.h:185
SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities > SQLTypeInfo
Definition: sqltypes.h:852
Definition: sqltypes.h:48

+ Here is the call graph for this function:

+ Here is the caller graph for this function: