OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.calcite.parser.HeavyDBSqlOperatorTable.ExtFunction Class Reference
+ Inheritance diagram for com.mapd.calcite.parser.HeavyDBSqlOperatorTable.ExtFunction:
+ Collaboration diagram for com.mapd.calcite.parser.HeavyDBSqlOperatorTable.ExtFunction:

Public Member Functions

List< String > getParamNames ()
 
RelDataType inferReturnType (SqlOperatorBinding opBinding)
 

Package Functions

 ExtFunction (final String name, final ExtensionFunction sig)
 

Private Attributes

final ExtensionFunction sig
 
final List< String > arg_names
 

Detailed Description

Definition at line 2655 of file HeavyDBSqlOperatorTable.java.

Constructor & Destructor Documentation

com.mapd.calcite.parser.HeavyDBSqlOperatorTable.ExtFunction.ExtFunction ( final String  name,
final ExtensionFunction  sig 
)
inlinepackage

Definition at line 2656 of file HeavyDBSqlOperatorTable.java.

References com.mapd.parser.server.ExtensionFunction.toSqlSignature().

2656  {
2657  super(name,
2658  SqlKind.OTHER_FUNCTION,
2659  null,
2660  null,
2661  OperandTypes.family(sig.toSqlSignature()),
2662  SqlFunctionCategory.SYSTEM);
2663  this.sig = sig;
2664  arg_names = sig.getArgNames();
2665  }
final java.util.List< SqlTypeFamily > toSqlSignature()
string name
Definition: setup.in.py:72

+ Here is the call graph for this function:

Member Function Documentation

List<String> com.mapd.calcite.parser.HeavyDBSqlOperatorTable.ExtFunction.getParamNames ( )
inline

Definition at line 2668 of file HeavyDBSqlOperatorTable.java.

2668  {
2669  return arg_names;
2670  }
RelDataType com.mapd.calcite.parser.HeavyDBSqlOperatorTable.ExtFunction.inferReturnType ( SqlOperatorBinding  opBinding)
inline

Definition at line 2673 of file HeavyDBSqlOperatorTable.java.

References com.mapd.parser.server.ExtensionFunction.getValueType(), and com.mapd.parser.server.ExtensionFunction.isArrayType().

2673  {
2674  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
2675  if (ExtensionFunction.isArrayType(sig.getRet())) {
2676  SqlTypeName valueType =
2677  toSqlTypeName(ExtensionFunction.getValueType(sig.getRet()));
2678  RelDataType subType = typeFactory.createSqlType(valueType, -1);
2679  RelDataType arr = typeFactory.createArrayType(subType, -1);
2680  // should the return type nullable property be true?
2681  return arr;
2682  } else {
2683  SqlTypeName ret = sig.getSqlRet();
2684  return typeFactory.createTypeWithNullability(
2685  typeFactory.createSqlType(ret), true);
2686  }
2687  }

+ Here is the call graph for this function:

Member Data Documentation

final List<String> com.mapd.calcite.parser.HeavyDBSqlOperatorTable.ExtFunction.arg_names
private

Definition at line 2690 of file HeavyDBSqlOperatorTable.java.

final ExtensionFunction com.mapd.calcite.parser.HeavyDBSqlOperatorTable.ExtFunction.sig
private

Definition at line 2689 of file HeavyDBSqlOperatorTable.java.


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