OmniSciDB
a5dc49c757
|
#include <TableFunctionsFactory.h>
Public Member Functions | |
TableFunction (const std::string &name, const TableFunctionOutputRowSizer output_sizer, const std::vector< ExtArgumentType > &input_args, const std::vector< ExtArgumentType > &output_args, const std::vector< ExtArgumentType > &sql_args, const std::vector< std::map< std::string, std::string >> &annotations, bool is_runtime, bool uses_manager) | |
std::vector< ExtArgumentType > | getArgs (const bool ensure_column=false) const |
const std::vector < ExtArgumentType > & | getInputArgs () const |
const std::vector < ExtArgumentType > & | getOutputArgs () const |
const std::vector < ExtArgumentType > & | getSqlArgs () const |
const std::vector< std::map < std::string, std::string > > & | getAnnotations () const |
const ExtArgumentType | getRet () const |
SQLTypeInfo | getInputSQLType (const size_t idx) const |
SQLTypeInfo | getOutputSQLType (const size_t idx) const |
int32_t | countScalarArgs () const |
size_t | getInputsSize () const |
size_t | getOutputsSize () const |
std::string | getName (const bool drop_suffix=false, const bool lower=false) const |
std::string | getSignature (const bool include_name, const bool include_output) const |
bool | hasCompileTimeOutputSizeConstant () const |
bool | hasPreFlightOutputSizer () const |
bool | hasUserSpecifiedOutputSizeConstant () const |
bool | hasConstantOutputSize () const |
bool | hasTableFunctionSpecifiedParameter () const |
bool | hasUserSpecifiedOutputSizeParameter () const |
bool | hasNonUserSpecifiedOutputSize () const |
bool | hasOutputSizeIndependentOfInputSize () const |
bool | hasOutputSizeKnownPreLaunch () const |
bool | hasUserSpecifiedOutputSizeMultiplier () const |
OutputBufferSizeType | getOutputRowSizeType () const |
size_t | getOutputRowSizeParameter () const |
bool | containsPreFlightFn () const |
std::string | getPreFlightFnName () const |
const std::map< std::string, std::string > | getAnnotations (const size_t idx) const |
const std::map< std::string, std::string > | getInputAnnotations (const size_t input_arg_idx) const |
const std::string | getInputAnnotation (const size_t input_arg_idx, const std::string &key, const std::string &default_) const |
const std::map< std::string, std::string > | getOutputAnnotations (const size_t output_arg_idx) const |
const std::string | getOutputAnnotation (const size_t output_arg_idx, const std::string &key, const std::string &default_) const |
const std::string | getFunctionAnnotation (const std::string &key, const std::string &default_) const |
const std::map< std::string, std::string > | getFunctionAnnotations () const |
const std::vector< std::string > | getCursorFields (const size_t sql_idx) const |
const std::string | getArgTypes (const bool use_input_args) const |
const std::string | getArgNames (const bool use_input_args) const |
const std::string | getInputArgsDefaultValues () const |
std::pair< int32_t, int32_t > | getInputID (const size_t idx) const |
size_t | getSqlOutputRowSizeParameter () const |
size_t | getOutputRowSizeParameter (const std::vector< SQLTypeInfo > &variant) const |
bool | isRuntime () const |
bool | usesManager () const |
bool | isGPU () const |
bool | isCPU () const |
bool | useDefaultSizer () 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 std::vector < ExtArgumentType > | sql_args_ |
const std::vector< std::map < std::string, std::string > > | annotations_ |
const bool | is_runtime_ |
const bool | uses_manager_ |
Definition at line 126 of file TableFunctionsFactory.h.
|
inline |
Definition at line 128 of file TableFunctionsFactory.h.
bool table_functions::TableFunction::containsPreFlightFn | ( | ) | const |
Definition at line 106 of file TableFunctionsFactory.cpp.
References annotations_, getInputAnnotations(), hasPreFlightOutputSizer(), and input_args_.
Referenced by TableFunctionExecutionContext::execute(), and Executor::executeTableFunction().
int32_t table_functions::TableFunction::countScalarArgs | ( | ) | const |
Definition at line 96 of file TableFunctionsFactory.cpp.
References input_args_, and is_ext_arg_type_scalar().
|
inline |
Definition at line 161 of file TableFunctionsFactory.h.
References annotations_.
Referenced by getFunctionAnnotations(), getInputAnnotations(), getOutputAnnotations(), and ThriftSerializers::to_thrift().
const std::map< std::string, std::string > table_functions::TableFunction::getAnnotations | ( | const size_t | idx | ) | const |
Definition at line 120 of file TableFunctionsFactory.cpp.
References annotations_, CHECK_LE, output_args_, and sql_args_.
const std::string table_functions::TableFunction::getArgNames | ( | const bool | use_input_args | ) | const |
Definition at line 216 of file TableFunctionsFactory.cpp.
References getCursorFields(), getInputAnnotation(), getOutputAnnotation(), join(), setup::name, output_args_, and sql_args_.
|
inline |
Definition at line 145 of file TableFunctionsFactory.h.
References run_benchmark_import::args, ext_arg_type_ensure_column(), input_args_, and output_args_.
const std::string table_functions::TableFunction::getArgTypes | ( | const bool | use_input_args | ) | const |
Definition at line 192 of file TableFunctionsFactory.cpp.
References getCursorFields(), input_args_, join(), output_args_, sql_args_, and ExtensionFunctionsWhitelist::toString().
const std::vector< std::string > table_functions::TableFunction::getCursorFields | ( | const size_t | sql_idx | ) | const |
Definition at line 179 of file TableFunctionsFactory.cpp.
References getInputAnnotation(), parse_ast::line, and split().
Referenced by getArgNames(), getArgTypes(), and getSignature().
const std::string table_functions::TableFunction::getFunctionAnnotation | ( | const std::string & | key, |
const std::string & | default_ | ||
) | const |
Definition at line 168 of file TableFunctionsFactory.cpp.
References getFunctionAnnotations().
const std::map< std::string, std::string > table_functions::TableFunction::getFunctionAnnotations | ( | ) | const |
Definition at line 164 of file TableFunctionsFactory.cpp.
References getAnnotations(), output_args_, and sql_args_.
Referenced by getFunctionAnnotation().
const std::string table_functions::TableFunction::getInputAnnotation | ( | const size_t | input_arg_idx, |
const std::string & | key, | ||
const std::string & | default_ | ||
) | const |
Definition at line 136 of file TableFunctionsFactory.cpp.
References getInputAnnotations().
Referenced by getArgNames(), getCursorFields(), getInputArgsDefaultValues(), and getSignature().
const std::map< std::string, std::string > table_functions::TableFunction::getInputAnnotations | ( | const size_t | input_arg_idx | ) | const |
Definition at line 130 of file TableFunctionsFactory.cpp.
References CHECK_LT, getAnnotations(), and input_args_.
Referenced by containsPreFlightFn(), and getInputAnnotation().
|
inline |
Definition at line 158 of file TableFunctionsFactory.h.
References input_args_.
Referenced by ThriftSerializers::to_thrift().
const std::string table_functions::TableFunction::getInputArgsDefaultValues | ( | ) | const |
Definition at line 238 of file TableFunctionsFactory.cpp.
References getInputAnnotation(), join(), setup::name, and sql_args_.
std::pair< int32_t, int32_t > table_functions::TableFunction::getInputID | ( | const size_t | idx | ) | const |
Definition at line 249 of file TableFunctionsFactory.cpp.
References ColumnGeoLineString, ColumnGeoMultiLineString, ColumnGeoMultiPoint, ColumnGeoMultiPolygon, ColumnGeoPoint, ColumnGeoPolygon, ColumnListGeoLineString, ColumnListGeoMultiLineString, ColumnListGeoMultiPoint, ColumnListGeoMultiPolygon, ColumnListGeoPoint, ColumnListGeoPolygon, ColumnListTextEncodingDict, ColumnTextEncodingDict, GeoLineString, GeoMultiLineString, GeoMultiPoint, GeoMultiPolygon, GeoPoint, GeoPolygon, getOutputAnnotations(), input_args_, PREFIX_LENGTH, and TextEncodingDict.
SQLTypeInfo table_functions::TableFunction::getInputSQLType | ( | const size_t | idx | ) | const |
Definition at line 82 of file TableFunctionsFactory.cpp.
References CHECK_LT, table_functions::anonymous_namespace{TableFunctionsFactory.cpp}::ext_arg_pointer_type_to_type_info(), and input_args_.
|
inline |
Definition at line 171 of file TableFunctionsFactory.h.
References input_args_.
std::string table_functions::TableFunction::getName | ( | const bool | drop_suffix = false , |
const bool | lower = false |
||
) | const |
Definition at line 563 of file TableFunctionsFactory.cpp.
References anonymous_namespace{RowFunctionManager.h}::drop_suffix_impl(), name_, run_benchmark_import::result, and to_lower().
Referenced by TableFunctionManager::allocate_output_buffers(), TableFunctionCompilationContext::compile(), TableFunctionCompilationContext::generateTableFunctionCall(), getPreFlightFnName(), getSignature(), and ThriftSerializers::to_thrift().
const std::string table_functions::TableFunction::getOutputAnnotation | ( | const size_t | output_arg_idx, |
const std::string & | key, | ||
const std::string & | default_ | ||
) | const |
Definition at line 153 of file TableFunctionsFactory.cpp.
References getOutputAnnotations().
Referenced by getArgNames().
const std::map< std::string, std::string > table_functions::TableFunction::getOutputAnnotations | ( | const size_t | output_arg_idx | ) | const |
Definition at line 147 of file TableFunctionsFactory.cpp.
References CHECK_LT, getAnnotations(), output_args_, and sql_args_.
Referenced by getInputID(), and getOutputAnnotation().
|
inline |
Definition at line 159 of file TableFunctionsFactory.h.
References output_args_.
Referenced by ThriftSerializers::to_thrift().
|
inline |
Definition at line 229 of file TableFunctionsFactory.h.
References output_sizer_, and table_functions::TableFunctionOutputRowSizer::val.
Referenced by getSqlOutputRowSizeParameter(), and ThriftSerializers::to_thrift().
|
inline |
Definition at line 257 of file TableFunctionsFactory.h.
References hasUserSpecifiedOutputSizeMultiplier(), output_sizer_, and table_functions::TableFunctionOutputRowSizer::val.
|
inline |
Definition at line 227 of file TableFunctionsFactory.h.
References output_sizer_.
Referenced by anonymous_namespace{TableFunctionExecutionContext.cpp}::get_output_row_count(), and ThriftSerializers::to_thrift().
SQLTypeInfo table_functions::TableFunction::getOutputSQLType | ( | const size_t | idx | ) | const |
Definition at line 87 of file TableFunctionsFactory.cpp.
References CHECK_LT, table_functions::anonymous_namespace{TableFunctionsFactory.cpp}::ext_arg_type_to_type_info_output(), and output_args_.
|
inline |
Definition at line 172 of file TableFunctionsFactory.h.
References output_args_.
std::string table_functions::TableFunction::getPreFlightFnName | ( | ) | const |
Definition at line 606 of file TableFunctionsFactory.cpp.
References getName(), and PREFLIGHT_SUFFIX.
Referenced by TableFunctionCompilationContext::generateTableFunctionCall().
|
inline |
std::string table_functions::TableFunction::getSignature | ( | const bool | include_name, |
const bool | include_output | ||
) | const |
Definition at line 574 of file TableFunctionsFactory.cpp.
References run_benchmark_import::args, getCursorFields(), getInputAnnotation(), getName(), input_args_, join(), setup::name, output_args_, sql_args_, ExtensionFunctionsWhitelist::toString(), and run_benchmark_import::type.
|
inline |
Definition at line 160 of file TableFunctionsFactory.h.
References sql_args_.
Referenced by ThriftSerializers::to_thrift().
size_t table_functions::TableFunction::getSqlOutputRowSizeParameter | ( | ) | const |
Definition at line 305 of file TableFunctionsFactory.cpp.
References CHECK, getOutputRowSizeParameter(), hasUserSpecifiedOutputSizeMultiplier(), input_args_, is_ext_arg_type_nonscalar(), is_ext_arg_type_scalar(), and sql_args_.
|
inline |
Definition at line 178 of file TableFunctionsFactory.h.
References table_functions::kConstant, and output_sizer_.
|
inline |
Definition at line 190 of file TableFunctionsFactory.h.
References table_functions::kConstant, table_functions::kUserSpecifiedConstantParameter, and output_sizer_.
|
inline |
Definition at line 204 of file TableFunctionsFactory.h.
References table_functions::kConstant, table_functions::kPreFlightParameter, table_functions::kTableFunctionSpecifiedParameter, and output_sizer_.
|
inline |
Definition at line 210 of file TableFunctionsFactory.h.
References table_functions::kConstant, table_functions::kPreFlightParameter, table_functions::kTableFunctionSpecifiedParameter, table_functions::kUserSpecifiedConstantParameter, and output_sizer_.
Referenced by TableFunctionExecutionContext::execute().
|
inline |
Definition at line 217 of file TableFunctionsFactory.h.
References table_functions::kConstant, table_functions::kUserSpecifiedConstantParameter, table_functions::kUserSpecifiedRowMultiplier, and output_sizer_.
Referenced by TableFunctionCompilationContext::generateEntryPoint().
|
inline |
Definition at line 182 of file TableFunctionsFactory.h.
References table_functions::kPreFlightParameter, and output_sizer_.
Referenced by containsPreFlightFn(), and TableFunctionCompilationContext::generateEntryPoint().
|
inline |
Definition at line 195 of file TableFunctionsFactory.h.
References table_functions::kTableFunctionSpecifiedParameter, and output_sizer_.
Referenced by Executor::executeTableFunction(), and TableFunctionExecutionContext::launchGpuCode().
|
inline |
Definition at line 186 of file TableFunctionsFactory.h.
References table_functions::kUserSpecifiedConstantParameter, and output_sizer_.
|
inline |
Definition at line 223 of file TableFunctionsFactory.h.
References table_functions::kUserSpecifiedRowMultiplier, and output_sizer_.
Referenced by getOutputRowSizeParameter(), and getSqlOutputRowSizeParameter().
|
inline |
Definition at line 199 of file TableFunctionsFactory.h.
References table_functions::kUserSpecifiedConstantParameter, table_functions::kUserSpecifiedRowMultiplier, and output_sizer_.
|
inline |
Definition at line 286 of file TableFunctionsFactory.h.
References name_, and usesManager().
|
inline |
Definition at line 282 of file TableFunctionsFactory.h.
References name_, and usesManager().
|
inline |
Definition at line 278 of file TableFunctionsFactory.h.
References is_runtime_.
Referenced by TableFunctionCompilationContext::passColumnsByValue().
|
inline |
Definition at line 295 of file TableFunctionsFactory.h.
References annotations_, input_args_, is_runtime_, name_, output_args_, output_sizer_, run_benchmark_import::result, sql_args_, ExtensionFunctionsWhitelist::toString(), and uses_manager_.
|
inline |
Definition at line 321 of file TableFunctionsFactory.h.
References input_args_, name_, output_args_, run_benchmark_import::result, and ExtensionFunctionsWhitelist::toStringSQL().
|
inline |
|
inline |
Definition at line 280 of file TableFunctionsFactory.h.
References uses_manager_.
Referenced by TableFunctionCompilationContext::generateEntryPoint(), isCPU(), and isGPU().
|
private |
Definition at line 336 of file TableFunctionsFactory.h.
Referenced by containsPreFlightFn(), getAnnotations(), and toString().
|
private |
Definition at line 333 of file TableFunctionsFactory.h.
Referenced by containsPreFlightFn(), countScalarArgs(), getArgs(), getArgTypes(), getInputAnnotations(), getInputArgs(), getInputID(), getInputSQLType(), getInputsSize(), getSignature(), getSqlOutputRowSizeParameter(), toString(), and toStringSQL().
|
private |
Definition at line 337 of file TableFunctionsFactory.h.
Referenced by isRuntime(), and toString().
|
private |
Definition at line 331 of file TableFunctionsFactory.h.
Referenced by getName(), isCPU(), isGPU(), toString(), toStringSQL(), and useDefaultSizer().
|
private |
Definition at line 334 of file TableFunctionsFactory.h.
Referenced by getAnnotations(), getArgNames(), getArgs(), getArgTypes(), getFunctionAnnotations(), getOutputAnnotations(), getOutputArgs(), getOutputSQLType(), getOutputsSize(), getSignature(), toString(), and toStringSQL().
|
private |
Definition at line 332 of file TableFunctionsFactory.h.
Referenced by getOutputRowSizeParameter(), getOutputRowSizeType(), hasCompileTimeOutputSizeConstant(), hasConstantOutputSize(), hasNonUserSpecifiedOutputSize(), hasOutputSizeIndependentOfInputSize(), hasOutputSizeKnownPreLaunch(), hasPreFlightOutputSizer(), hasTableFunctionSpecifiedParameter(), hasUserSpecifiedOutputSizeConstant(), hasUserSpecifiedOutputSizeMultiplier(), hasUserSpecifiedOutputSizeParameter(), and toString().
|
private |
Definition at line 335 of file TableFunctionsFactory.h.
Referenced by getAnnotations(), getArgNames(), getArgTypes(), getFunctionAnnotations(), getInputArgsDefaultValues(), getOutputAnnotations(), getSignature(), getSqlArgs(), getSqlOutputRowSizeParameter(), and toString().
|
private |
Definition at line 338 of file TableFunctionsFactory.h.
Referenced by toString(), and usesManager().