OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
table_functions::TableFunction Class Reference

#include <TableFunctionsFactory.h>

+ Collaboration diagram for table_functions::TableFunction:

Public Member Functions

 TableFunction (const std::string &name, const TableFunctionOutputRowSizer output_sizer, const std::vector< ExtArgumentType > &input_args, const std::vector< ExtArgumentType > &output_args, bool is_runtime)
 
std::vector< ExtArgumentTypegetArgs () const
 
const std::vector
< ExtArgumentType > & 
getInputArgs () const
 
const ExtArgumentType getRet () const
 
SQLTypeInfo getInputSQLType (const size_t idx) const
 
SQLTypeInfo getOutputSQLType (const size_t idx) const
 
auto getInputsSize () const
 
auto getOutputsSize () const
 
auto getName () const
 
bool hasUserSpecifiedOutputMultiplier () const
 
size_t getOutputRowParameter () const
 
bool isRuntime () const
 
std::string toString () const
 
std::string toStringSQL () const
 

Private Attributes

const std::string name_
 
const TableFunctionOutputRowSizer output_sizer_
 
const std::vector
< ExtArgumentType
input_args_
 
const std::vector
< ExtArgumentType
output_args_
 
const bool is_runtime_
 

Detailed Description

Definition at line 37 of file TableFunctionsFactory.h.

Constructor & Destructor Documentation

table_functions::TableFunction::TableFunction ( const std::string &  name,
const TableFunctionOutputRowSizer  output_sizer,
const std::vector< ExtArgumentType > &  input_args,
const std::vector< ExtArgumentType > &  output_args,
bool  is_runtime 
)
inline

Definition at line 39 of file TableFunctionsFactory.h.

44  : name_(name)
45  , output_sizer_(output_sizer)
46  , input_args_(input_args)
47  , output_args_(output_args)
48  , is_runtime_(is_runtime) {}
const TableFunctionOutputRowSizer output_sizer_
const std::vector< ExtArgumentType > output_args_
const std::vector< ExtArgumentType > input_args_
string name
Definition: setup.py:35

Member Function Documentation

std::vector<ExtArgumentType> table_functions::TableFunction::getArgs ( ) const
inline

Definition at line 50 of file TableFunctionsFactory.h.

References run_benchmark_import::args, input_args_, and output_args_.

50  {
51  std::vector<ExtArgumentType> args;
52  args.insert(args.end(), input_args_.begin(), input_args_.end());
53  args.insert(args.end(), output_args_.begin(), output_args_.end());
54  return args;
55  }
const std::vector< ExtArgumentType > output_args_
const std::vector< ExtArgumentType > input_args_
const std::vector<ExtArgumentType>& table_functions::TableFunction::getInputArgs ( ) const
inline

Definition at line 56 of file TableFunctionsFactory.h.

References input_args_.

56 { return input_args_; }
const std::vector< ExtArgumentType > input_args_
SQLTypeInfo table_functions::TableFunction::getInputSQLType ( const size_t  idx) const

Definition at line 75 of file TableFunctionsFactory.cpp.

References CHECK_LT, table_functions::anonymous_namespace{TableFunctionsFactory.cpp}::ext_arg_pointer_type_to_type_info(), and input_args_.

75  {
76  CHECK_LT(idx, input_args_.size());
78 }
SQLTypeInfo ext_arg_pointer_type_to_type_info(const ExtArgumentType ext_arg_type)
#define CHECK_LT(x, y)
Definition: Logger.h:207
const std::vector< ExtArgumentType > input_args_

+ Here is the call graph for this function:

auto table_functions::TableFunction::getInputsSize ( ) const
inline

Definition at line 62 of file TableFunctionsFactory.h.

References input_args_.

62 { return input_args_.size(); }
const std::vector< ExtArgumentType > input_args_
auto table_functions::TableFunction::getName ( ) const
inline

Definition at line 65 of file TableFunctionsFactory.h.

References name_.

65 { return name_; }
size_t table_functions::TableFunction::getOutputRowParameter ( ) const
inline

Definition at line 71 of file TableFunctionsFactory.h.

References output_sizer_, and table_functions::TableFunctionOutputRowSizer::val.

Referenced by RelAlgExecutor::createTableFunctionWorkUnit().

71 { return output_sizer_.val; }
const TableFunctionOutputRowSizer output_sizer_

+ Here is the caller graph for this function:

SQLTypeInfo table_functions::TableFunction::getOutputSQLType ( const size_t  idx) const

Definition at line 80 of file TableFunctionsFactory.cpp.

References CHECK_LT, table_functions::anonymous_namespace{TableFunctionsFactory.cpp}::ext_arg_pointer_type_to_type_info(), and output_args_.

80  {
81  CHECK_LT(idx, output_args_.size());
82  // TODO(adb): conditionally handle nulls
84 }
SQLTypeInfo ext_arg_pointer_type_to_type_info(const ExtArgumentType ext_arg_type)
const std::vector< ExtArgumentType > output_args_
#define CHECK_LT(x, y)
Definition: Logger.h:207

+ Here is the call graph for this function:

auto table_functions::TableFunction::getOutputsSize ( ) const
inline

Definition at line 63 of file TableFunctionsFactory.h.

References output_args_.

63 { return output_args_.size(); }
const std::vector< ExtArgumentType > output_args_
const ExtArgumentType table_functions::TableFunction::getRet ( ) const
inline

Definition at line 57 of file TableFunctionsFactory.h.

References Int32.

bool table_functions::TableFunction::hasUserSpecifiedOutputMultiplier ( ) const
inline
bool table_functions::TableFunction::isRuntime ( ) const
inline

Definition at line 73 of file TableFunctionsFactory.h.

References is_runtime_.

std::string table_functions::TableFunction::toString ( ) const
inline

Definition at line 75 of file TableFunctionsFactory.h.

References input_args_, is_runtime_, name_, output_args_, run_benchmark_import::result, and ExtensionFunctionsWhitelist::toString().

75  {
76  auto result = "TableFunction(" + name_ + ", [";
78  result += "], [";
80  result += "], is_runtime=" + std::string((is_runtime_ ? "true" : "false"));
81  result += ")";
82  return result;
83  }
const std::vector< ExtArgumentType > output_args_
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")
const std::vector< ExtArgumentType > input_args_

+ Here is the call graph for this function:

std::string table_functions::TableFunction::toStringSQL ( ) const
inline

Definition at line 85 of file TableFunctionsFactory.h.

References input_args_, name_, output_args_, run_benchmark_import::result, and ExtensionFunctionsWhitelist::toStringSQL().

85  {
86  auto result = name_ + "(";
88  result += ") -> (";
90  result += ")";
91  return result;
92  }
const std::vector< ExtArgumentType > output_args_
const std::vector< ExtArgumentType > input_args_
static std::string toStringSQL(const std::vector< ExtArgumentType > &sig_types)

+ Here is the call graph for this function:

Member Data Documentation

const std::vector<ExtArgumentType> table_functions::TableFunction::input_args_
private
const bool table_functions::TableFunction::is_runtime_
private

Definition at line 99 of file TableFunctionsFactory.h.

Referenced by isRuntime(), and toString().

const std::string table_functions::TableFunction::name_
private

Definition at line 95 of file TableFunctionsFactory.h.

Referenced by getName(), toString(), and toStringSQL().

const std::vector<ExtArgumentType> table_functions::TableFunction::output_args_
private
const TableFunctionOutputRowSizer table_functions::TableFunction::output_sizer_
private

The documentation for this class was generated from the following files: