OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExtensionFunctionsBinding.h File Reference
#include "ExtensionFunctionsWhitelist.h"
#include "../Analyzer/Analyzer.h"
#include "../Shared/sqltypes.h"
#include <vector>
+ Include dependency graph for ExtensionFunctionsBinding.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Analyzer
 

Functions

ExtensionFunction bind_function (std::string name, Analyzer::ExpressionPtrVector func_args)
 
ExtensionFunction bind_function (const Analyzer::FunctionOper *function_oper)
 
bool is_ext_arg_type_array (const ExtArgumentType ext_arg_type)
 
bool is_ext_arg_type_geo (const ExtArgumentType ext_arg_type)
 

Function Documentation

ExtensionFunction bind_function ( std::string  name,
Analyzer::ExpressionPtrVector  func_args 
)

Definition at line 336 of file ExtensionFunctionsBinding.cpp.

References bind_function(), and ExtensionFunctionsWhitelist::get_ext_funcs().

337  {
338  // used in RelAlgTranslator.cpp
339  std::vector<ExtensionFunction> ext_funcs =
341  return bind_function(name, func_args, ext_funcs);
342 }
static std::vector< ExtensionFunction > get_ext_funcs(const std::string &name)
ExtensionFunction bind_function(std::string name, Analyzer::ExpressionPtrVector func_args, const std::vector< ExtensionFunction > &ext_funcs)

+ Here is the call graph for this function:

ExtensionFunction bind_function ( const Analyzer::FunctionOper function_oper)

Definition at line 344 of file ExtensionFunctionsBinding.cpp.

References bind_function(), Analyzer::FunctionOper::getArity(), Analyzer::FunctionOper::getName(), and Analyzer::FunctionOper::getOwnArg().

344  {
345  // used in ExtensionIR.cpp
346  auto name = function_oper->getName();
347  Analyzer::ExpressionPtrVector func_args = {};
348  for (size_t i = 0; i < function_oper->getArity(); ++i) {
349  func_args.push_back(function_oper->getOwnArg(i));
350  }
351  return bind_function(name, func_args);
352 }
size_t getArity() const
Definition: Analyzer.h:1309
ExtensionFunction bind_function(std::string name, Analyzer::ExpressionPtrVector func_args, const std::vector< ExtensionFunction > &ext_funcs)
std::shared_ptr< Analyzer::Expr > getOwnArg(const size_t i) const
Definition: Analyzer.h:1316
std::vector< ExpressionPtr > ExpressionPtrVector
Definition: Analyzer.h:182
std::string getName() const
Definition: Analyzer.h:1307

+ Here is the call graph for this function:

bool is_ext_arg_type_array ( const ExtArgumentType  ext_arg_type)

Definition at line 354 of file ExtensionFunctionsBinding.cpp.

References ArrayDouble, ArrayFloat, ArrayInt16, ArrayInt32, ArrayInt64, and ArrayInt8.

Referenced by CodeGenerator::codegenFunctionOperCastArgs(), and anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments().

+ Here is the caller graph for this function:

bool is_ext_arg_type_geo ( const ExtArgumentType  ext_arg_type)

Definition at line 369 of file ExtensionFunctionsBinding.cpp.

References GeoLineString, GeoPoint, and GeoPolygon.

Referenced by CodeGenerator::codegenFunctionOperCastArgs().

369  {
370  switch (ext_arg_type) {
374  return true;
375 
376  default:
377  return false;
378  }
379 }

+ Here is the caller graph for this function: