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

Public Member Functions

 Replace ()
 
RelDataType inferReturnType (SqlOperatorBinding opBinding)
 
SqlCall createCall (@Nullable SqlLiteral functionQualifier, SqlParserPos pos,@Nullable SqlNode...operands)
 
boolean requiresCreate (List< SqlNode > operands)
 

Static Private Member Functions

static java.util.List
< SqlTypeFamily > 
getSignatureFamilies ()
 

Detailed Description

Definition at line 991 of file HeavyDBSqlOperatorTable.java.

Constructor & Destructor Documentation

com.mapd.calcite.parser.HeavyDBSqlOperatorTable.Replace.Replace ( )
inline

Definition at line 992 of file HeavyDBSqlOperatorTable.java.

References heavydb.dtypes.STRING.

992  {
993  super("REPLACE",
994  SqlKind.OTHER_FUNCTION,
995  null,
996  null,
997  OperandTypes.family(getSignatureFamilies()),
999  }
tuple STRING
Definition: dtypes.py:31
static java.util.List< SqlTypeFamily > getSignatureFamilies()

Member Function Documentation

SqlCall com.mapd.calcite.parser.HeavyDBSqlOperatorTable.Replace.createCall ( @Nullable SqlLiteral  functionQualifier,
SqlParserPos  pos,
@Nullable SqlNode...  operands 
)
inline

Definition at line 1016 of file HeavyDBSqlOperatorTable.java.

1018  {
1019  assert functionQualifier == null;
1020  switch (operands.length) {
1021  case 2:
1022  operands = new SqlNode[] {
1023  operands[0], operands[1], SqlLiteral.createCharString("", pos)};
1024  break;
1025  case 3:
1026  break;
1027  default:
1028  throw new IllegalArgumentException(
1029  "Invalid operand count " + Arrays.toString(operands));
1030  }
1031  return super.createCall(functionQualifier, pos, operands);
1032  }
static java.util.List<SqlTypeFamily> com.mapd.calcite.parser.HeavyDBSqlOperatorTable.Replace.getSignatureFamilies ( )
inlinestaticprivate

Definition at line 1001 of file HeavyDBSqlOperatorTable.java.

References heavydb.dtypes.STRING.

1001  {
1002  java.util.ArrayList<SqlTypeFamily> families =
1003  new java.util.ArrayList<SqlTypeFamily>();
1004  families.add(SqlTypeFamily.STRING);
1005  families.add(SqlTypeFamily.STRING);
1006  families.add(SqlTypeFamily.STRING);
1007  return families;
1008  }
tuple STRING
Definition: dtypes.py:31
RelDataType com.mapd.calcite.parser.HeavyDBSqlOperatorTable.Replace.inferReturnType ( SqlOperatorBinding  opBinding)
inline

Definition at line 1011 of file HeavyDBSqlOperatorTable.java.

1011  {
1012  return opBinding.getOperandType(0);
1013  }
boolean com.mapd.calcite.parser.HeavyDBSqlOperatorTable.Replace.requiresCreate ( List< SqlNode >  operands)
inline

Definition at line 1035 of file HeavyDBSqlOperatorTable.java.

1035  {
1036  // if there are only 2 Operands, the code will be creating 'defaults'
1037  return (operands.size() == 2);
1038  }

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