OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExtensionFunctionsWhitelist.h File Reference
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "../Shared/sqltypes.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::Bool, ExtArgumentType::ArrayInt8, ExtArgumentType::ArrayInt16,
  ExtArgumentType::ArrayInt32, ExtArgumentType::ArrayInt64, ExtArgumentType::ArrayFloat, ExtArgumentType::ArrayDouble,
  ExtArgumentType::GeoPoint, ExtArgumentType::GeoLineString, ExtArgumentType::Cursor, ExtArgumentType::GeoPolygon
}
 

Functions

SQLTypeInfo ext_arg_type_to_type_info (const ExtArgumentType ext_arg_type)
 

Enumeration Type Documentation

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: