OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExtensionFunctionsWhitelist.h File Reference

Supported runtime functions management and retrieval. More...

#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "Shared/sqltypes.h"
#include "Shared/toString.h"
+ Include dependency graph for ExtensionFunctionsWhitelist.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ExtensionFunction
 
class  ExtensionFunctionsWhitelist
 

Enumerations

enum  ExtArgumentType {
  ExtArgumentType::Int8, ExtArgumentType::Int16, ExtArgumentType::Int32, ExtArgumentType::Int64,
  ExtArgumentType::Float, ExtArgumentType::Double, ExtArgumentType::Void, ExtArgumentType::PInt8,
  ExtArgumentType::PInt16, ExtArgumentType::PInt32, ExtArgumentType::PInt64, ExtArgumentType::PFloat,
  ExtArgumentType::PDouble, ExtArgumentType::PBool, ExtArgumentType::Bool, ExtArgumentType::ArrayInt8,
  ExtArgumentType::ArrayInt16, ExtArgumentType::ArrayInt32, ExtArgumentType::ArrayInt64, ExtArgumentType::ArrayFloat,
  ExtArgumentType::ArrayDouble, ExtArgumentType::ArrayBool, ExtArgumentType::GeoPoint, ExtArgumentType::GeoLineString,
  ExtArgumentType::Cursor, ExtArgumentType::GeoPolygon, ExtArgumentType::GeoMultiPolygon, ExtArgumentType::ColumnInt8,
  ExtArgumentType::ColumnInt16, ExtArgumentType::ColumnInt32, ExtArgumentType::ColumnInt64, ExtArgumentType::ColumnFloat,
  ExtArgumentType::ColumnDouble, ExtArgumentType::ColumnBool, ExtArgumentType::TextEncodingNone, ExtArgumentType::TextEncodingDict,
  ExtArgumentType::ColumnListInt8, ExtArgumentType::ColumnListInt16, ExtArgumentType::ColumnListInt32, ExtArgumentType::ColumnListInt64,
  ExtArgumentType::ColumnListFloat, ExtArgumentType::ColumnListDouble, ExtArgumentType::ColumnListBool, ExtArgumentType::ColumnTextEncodingDict,
  ExtArgumentType::ColumnListTextEncodingDict, ExtArgumentType::ColumnTimestamp, ExtArgumentType::Timestamp
}
 

Functions

SQLTypeInfo ext_arg_type_to_type_info (const ExtArgumentType ext_arg_type)
 
std::string toString (const ExtArgumentType &sig_type)
 

Detailed Description

Supported runtime functions management and retrieval.

Definition in file ExtensionFunctionsWhitelist.h.

Enumeration Type Documentation

enum ExtArgumentType
strong
Enumerator
Int8 
Int16 
Int32 
Int64 
Float 
Double 
Void 
PInt8 
PInt16 
PInt32 
PInt64 
PFloat 
PDouble 
PBool 
Bool 
ArrayInt8 
ArrayInt16 
ArrayInt32 
ArrayInt64 
ArrayFloat 
ArrayDouble 
ArrayBool 
GeoPoint 
GeoLineString 
Cursor 
GeoPolygon 
GeoMultiPolygon 
ColumnInt8 
ColumnInt16 
ColumnInt32 
ColumnInt64 
ColumnFloat 
ColumnDouble 
ColumnBool 
TextEncodingNone 
TextEncodingDict 
ColumnListInt8 
ColumnListInt16 
ColumnListInt32 
ColumnListInt64 
ColumnListFloat 
ColumnListDouble 
ColumnListBool 
ColumnTextEncodingDict 
ColumnListTextEncodingDict 
ColumnTimestamp 
Timestamp 

Definition at line 37 of file ExtensionFunctionsWhitelist.h.

37  {
38  Int8,
39  Int16,
40  Int32,
41  Int64,
42  Float,
43  Double,
44  Void,
45  PInt8,
46  PInt16,
47  PInt32,
48  PInt64,
49  PFloat,
50  PDouble,
51  PBool,
52  Bool,
53  ArrayInt8,
54  ArrayInt16,
55  ArrayInt32,
56  ArrayInt64,
57  ArrayFloat,
59  ArrayBool,
60  GeoPoint,
62  Cursor,
63  GeoPolygon,
65  ColumnInt8,
71  ColumnBool,
84  Timestamp,
85 };

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: