OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExtensionFunctionsWhitelist.cpp File Reference
#include "QueryEngine/ExtensionFunctionsWhitelist.h"
#include <boost/algorithm/string/join.hpp>
#include <iostream>
#include "QueryEngine/ExtensionFunctionsBinding.h"
#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, bool byval=true, bool declare=false)
 
std::string anonymous_namespace{ExtensionFunctionsWhitelist.cpp}::drop_suffix (const std::string &str)
 
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 toString (const ExtArgumentType &sig_type)
 

Typedef Documentation

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

Definition at line 737 of file ExtensionFunctionsWhitelist.cpp.

Function Documentation

SQLTypeInfo ext_arg_type_to_type_info ( const ExtArgumentType  ext_arg_type)

Definition at line 271 of file ExtensionFunctionsWhitelist.cpp.

References ArrayBool, ArrayDouble, ArrayFloat, ArrayInt16, ArrayInt32, ArrayInt64, ArrayInt8, Bool, ColumnBool, ColumnDouble, ColumnFloat, ColumnInt16, ColumnInt32, ColumnInt64, ColumnInt8, ColumnListBool, ColumnListDouble, ColumnListFloat, ColumnListInt16, ColumnListInt32, ColumnListInt64, ColumnListInt8, ColumnListTextEncodingDict, ColumnTextEncodingDict, ColumnTimestamp, Double, logger::FATAL, Float, generate_array_type(), generate_column_type(), Int16, Int32, Int64, Int8, kBIGINT, kBOOLEAN, kDOUBLE, kENCODING_DICT, kENCODING_NONE, kFLOAT, kINT, kNULLT, kSMALLINT, kTEXT, kTIMESTAMP, kTINYINT, LOG, anonymous_namespace{ExtensionFunctionsWhitelist.cpp}::serialize_type(), TextEncodingDict, TextEncodingNone, and Timestamp.

Referenced by bind_function(), RelAlgExecutor::createTableFunctionWorkUnit(), ExtensionFunctionsWhitelist::get_ext_funcs(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_numeric_argument(), and RelAlgTranslator::translateFunction().

271  {
272  /* This function is mostly used for scalar types.
273  For non-scalar types, NULL is returned as a placeholder.
274  */
275 
276  switch (ext_arg_type) {
278  return SQLTypeInfo(kBOOLEAN, false);
280  return SQLTypeInfo(kTINYINT, false);
282  return SQLTypeInfo(kSMALLINT, false);
284  return SQLTypeInfo(kINT, false);
286  return SQLTypeInfo(kBIGINT, false);
288  return SQLTypeInfo(kFLOAT, false);
290  return SQLTypeInfo(kDOUBLE, false);
296  return generate_array_type(kINT);
300  return generate_array_type(kFLOAT);
310  return generate_column_type(kINT);
320  return generate_column_type(kTEXT, kENCODING_DICT, 0 /* comp_param */);
322  return SQLTypeInfo(kTEXT, false, kENCODING_NONE);
324  return SQLTypeInfo(kTEXT, false, kENCODING_DICT);
326  return SQLTypeInfo(kTIMESTAMP, 9, 0, false);
334  return generate_column_type(kINT);
344  return generate_column_type(kTEXT, kENCODING_DICT, 0 /* comp_param */);
345  default:
346  LOG(FATAL) << "ExtArgumentType `" << serialize_type(ext_arg_type)
347  << "` cannot be converted to SQLTypeInfo.";
348  }
349  return SQLTypeInfo(kNULLT, false);
350 }
#define LOG(tag)
Definition: Logger.h:216
auto generate_column_type(const SQLTypes subtype)
Definition: sqltypes.h:1124
auto generate_array_type(const SQLTypes subtype)
Definition: sqltypes.h:1118
Definition: sqltypes.h:52
std::string serialize_type(const ExtArgumentType type, bool byval=true, bool declare=false)
Definition: sqltypes.h:45

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string toString ( const ExtArgumentType sig_type)

Definition at line 807 of file ExtensionFunctionsWhitelist.cpp.

References ExtensionFunctionsWhitelist::toString().

807  {
808  return ExtensionFunctionsWhitelist::toString(sig_type);
809 }
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")

+ Here is the call graph for this function: