OmniSciDB  04ee39c94c
ExtensionFunctionsWhitelist.h File Reference
#include <string>
#include <unordered_map>
#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::PInt8, ExtArgumentType::PInt16,
  ExtArgumentType::PInt32, ExtArgumentType::PInt64, ExtArgumentType::PFloat, ExtArgumentType::PDouble,
  ExtArgumentType::Bool
}
 

Functions

SQLTypeInfo ext_arg_type_to_type_info (const ExtArgumentType ext_arg_type)
 

Enumeration Type Documentation

◆ ExtArgumentType

enum ExtArgumentType
strong

Function Documentation

◆ ext_arg_type_to_type_info()

SQLTypeInfo ext_arg_type_to_type_info ( const ExtArgumentType  ext_arg_type)

Definition at line 153 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(), CodeGenerator::codegenFunctionOperCastArgs(), ExtensionFunctionsWhitelist::get_ext_funcs(), and RelAlgTranslator::translateFunction().

153  {
154  /* This function is mostly used for scalar types.
155  For non-scalar types, NULL is returned as a placeholder.
156  */
157  switch (ext_arg_type) {
159  return SQLTypeInfo(kBOOLEAN, false);
161  return SQLTypeInfo(kTINYINT, false);
163  return SQLTypeInfo(kSMALLINT, false);
165  return SQLTypeInfo(kINT, false);
167  return SQLTypeInfo(kBIGINT, false);
169  return SQLTypeInfo(kFLOAT, false);
171  return SQLTypeInfo(kDOUBLE, false);
172  default:
173  LOG(WARNING) << "ExtArgumentType `" << serialize_type(ext_arg_type)
174  << "` cannot be converted to SQLTypeInfo. Returning nulltype.";
175  }
176  return SQLTypeInfo(kNULLT, false);
177 }
#define LOG(tag)
Definition: Logger.h:182
SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities > SQLTypeInfo
Definition: sqltypes.h:823
Definition: sqltypes.h:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function: