OmniSciDB  0264ff685a
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 (const std::string &str)
 

Function Documentation

◆ drop_suffix()

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

Definition at line 223 of file TableFunctionsFactory.cpp.

References CHECK_GT.

Referenced by table_functions::TableFunctionsFactory::get_table_funcs().

223  {
224  const auto idx = str.find("__");
225  if (idx == std::string::npos) {
226  return str;
227  }
228  CHECK_GT(idx, std::string::size_type(0));
229  return str.substr(0, idx);
230 }
#define CHECK_GT(x, y)
Definition: Logger.h:209
+ Here is the caller graph for this function:

◆ ext_arg_pointer_type_to_type_info()

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

Definition at line 28 of file TableFunctionsFactory.cpp.

References ColumnBool, ColumnDouble, ColumnFloat, ColumnInt16, ColumnInt32, ColumnInt64, ColumnInt8, kBIGINT, kBOOLEAN, kCOLUMN, kDOUBLE, kENCODING_NONE, 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().

28  {
29  auto generate_column_type = [](const auto& subtype) {
30  return SQLTypeInfo(kCOLUMN, 0, 0, false, kENCODING_NONE, 0, subtype);
31  };
32  switch (ext_arg_type) {
34  return SQLTypeInfo(kTINYINT, false);
36  return SQLTypeInfo(kSMALLINT, false);
38  return SQLTypeInfo(kINT, false);
40  return SQLTypeInfo(kBIGINT, false);
42  return SQLTypeInfo(kFLOAT, false);
44  return SQLTypeInfo(kDOUBLE, false);
46  return SQLTypeInfo(kBOOLEAN, false);
48  return generate_column_type(kTINYINT);
50  return generate_column_type(kSMALLINT);
52  return generate_column_type(kINT);
54  return generate_column_type(kBIGINT);
56  return generate_column_type(kFLOAT);
58  return generate_column_type(kDOUBLE);
60  return generate_column_type(kBOOLEAN);
61  default:
62  LOG(WARNING) << "ext_arg_pointer_type_to_type_info: ExtArgumentType `"
64  << "` conversion to SQLTypeInfo not implemented.";
65  UNREACHABLE();
66  }
67  UNREACHABLE();
68  return SQLTypeInfo(kNULLT, false);
69 }
#define LOG(tag)
Definition: Logger.h:188
#define UNREACHABLE()
Definition: Logger.h:241
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")
Definition: sqltypes.h:44
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ext_arg_type_to_type_info_output()

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

Definition at line 71 of file TableFunctionsFactory.cpp.

References Bool, ColumnBool, ColumnDouble, ColumnFloat, ColumnInt16, ColumnInt32, ColumnInt64, ColumnInt8, Double, Float, Int16, Int32, Int64, Int8, 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::getOutputSQLType().

71  {
72  switch (ext_arg_type) {
76  return SQLTypeInfo(kTINYINT, false);
80  return SQLTypeInfo(kSMALLINT, false);
84  return SQLTypeInfo(kINT, false);
88  return SQLTypeInfo(kBIGINT, false);
92  return SQLTypeInfo(kFLOAT, false);
96  return SQLTypeInfo(kDOUBLE, false);
100  return SQLTypeInfo(kBOOLEAN, false);
101  default:
102  LOG(WARNING) << "ext_arg_pointer_type_to_type_info: ExtArgumentType `"
104  << "` conversion to SQLTypeInfo not implemented.";
105  UNREACHABLE();
106  }
107  UNREACHABLE();
108  return SQLTypeInfo(kNULLT, false);
109 }
#define LOG(tag)
Definition: Logger.h:188
#define UNREACHABLE()
Definition: Logger.h:241
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")
Definition: sqltypes.h:44
+ Here is the call graph for this function:
+ Here is the caller graph for this function: