OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
table_functions::anonymous_namespace{TableFunctionsFactory.cpp} Namespace Reference

Functions

SQLTypeInfo ext_arg_pointer_type_to_type_info (const ExtArgumentType ext_arg_type)
 
SQLTypeInfo ext_arg_type_to_type_info_output (const ExtArgumentType ext_arg_type)
 
std::string drop_suffix_impl (const std::string &str)
 

Function Documentation

std::string table_functions::anonymous_namespace{TableFunctionsFactory.cpp}::drop_suffix_impl ( const std::string &  str)

Definition at line 511 of file TableFunctionsFactory.cpp.

References CHECK_GT.

Referenced by table_functions::TableFunctionsFactory::get_table_funcs(), and table_functions::TableFunction::getName().

511  {
512  const auto idx = str.find("__");
513  if (idx == std::string::npos) {
514  return str;
515  }
516  CHECK_GT(idx, std::string::size_type(0));
517  return str.substr(0, idx);
518 }
#define CHECK_GT(x, y)
Definition: Logger.h:234

+ Here is the caller graph for this function:

SQLTypeInfo table_functions::anonymous_namespace{TableFunctionsFactory.cpp}::ext_arg_pointer_type_to_type_info ( const ExtArgumentType  ext_arg_type)

Definition at line 30 of file TableFunctionsFactory.cpp.

References ColumnBool, ColumnDouble, ColumnFloat, ColumnInt16, ColumnInt32, ColumnInt64, ColumnInt8, ColumnListBool, ColumnListDouble, ColumnListFloat, ColumnListInt16, ColumnListInt32, ColumnListInt64, ColumnListInt8, generate_column_list_type(), generate_column_type(), kBIGINT, kBOOLEAN, kDOUBLE, kFLOAT, kINT, kNULLT, kSMALLINT, kTINYINT, LOG, PBool, PDouble, PFloat, PInt16, PInt32, PInt64, PInt8, ExtensionFunctionsWhitelist::toString(), UNREACHABLE, and logger::WARNING.

Referenced by table_functions::TableFunction::getInputSQLType().

30  {
31  switch (ext_arg_type) {
33  return SQLTypeInfo(kTINYINT, false);
35  return SQLTypeInfo(kSMALLINT, false);
37  return SQLTypeInfo(kINT, false);
39  return SQLTypeInfo(kBIGINT, false);
41  return SQLTypeInfo(kFLOAT, false);
43  return SQLTypeInfo(kDOUBLE, false);
45  return SQLTypeInfo(kBOOLEAN, false);
51  return generate_column_type(kINT);
74  default:
75  LOG(WARNING) << "ext_arg_pointer_type_to_type_info: ExtArgumentType `"
77  << "` conversion to SQLTypeInfo not implemented.";
78  UNREACHABLE();
79  }
80  UNREACHABLE();
81  return SQLTypeInfo(kNULLT, false);
82 }
#define LOG(tag)
Definition: Logger.h:216
auto generate_column_type(const SQLTypes subtype)
Definition: sqltypes.h:1124
#define UNREACHABLE()
Definition: Logger.h:266
auto generate_column_list_type(const SQLTypes subtype)
Definition: sqltypes.h:1138
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")
Definition: sqltypes.h:45

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SQLTypeInfo table_functions::anonymous_namespace{TableFunctionsFactory.cpp}::ext_arg_type_to_type_info_output ( const ExtArgumentType  ext_arg_type)

Definition at line 84 of file TableFunctionsFactory.cpp.

References Bool, ColumnBool, ColumnDouble, ColumnFloat, ColumnInt16, ColumnInt32, ColumnInt64, ColumnInt8, ColumnListBool, ColumnListDouble, ColumnListFloat, ColumnListInt16, ColumnListInt32, ColumnListInt64, ColumnListInt8, ColumnListTextEncodingDict, ColumnTextEncodingDict, ColumnTimestamp, Double, Float, Int16, Int32, Int64, Int8, kBIGINT, kBOOLEAN, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kNULLT, kSMALLINT, kTEXT, kTIMESTAMP, kTINYINT, LOG, PBool, PDouble, PFloat, PInt16, PInt32, PInt64, PInt8, TextEncodingDict, ExtensionFunctionsWhitelist::toString(), UNREACHABLE, and logger::WARNING.

Referenced by table_functions::TableFunction::getOutputSQLType().

84  {
85  switch (ext_arg_type) {
90  return SQLTypeInfo(kTINYINT, false);
95  return SQLTypeInfo(kSMALLINT, false);
100  return SQLTypeInfo(kINT, false);
105  return SQLTypeInfo(kBIGINT, false);
110  return SQLTypeInfo(kFLOAT, false);
115  return SQLTypeInfo(kDOUBLE, false);
120  return SQLTypeInfo(kBOOLEAN, false);
124  return SQLTypeInfo(kTEXT, false, kENCODING_DICT);
126  return SQLTypeInfo(kTIMESTAMP, 9, 0, false);
127  default:
128  LOG(WARNING) << "ext_arg_type_to_type_info_output: ExtArgumentType `"
130  << "` conversion to SQLTypeInfo not implemented.";
131  UNREACHABLE();
132  }
133  UNREACHABLE();
134  return SQLTypeInfo(kNULLT, false);
135 }
#define LOG(tag)
Definition: Logger.h:216
#define UNREACHABLE()
Definition: Logger.h:266
Definition: sqltypes.h:52
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")
Definition: sqltypes.h:45

+ Here is the call graph for this function:

+ Here is the caller graph for this function: