OmniSciDB  a5dc49c757
 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 1199 of file HeavyDBSqlOperatorTable.java.

Constructor & Destructor Documentation

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

Definition at line 1200 of file HeavyDBSqlOperatorTable.java.

References heavydb.dtypes.STRING.

1200  {
1201  super("REPLACE",
1202  SqlKind.OTHER_FUNCTION,
1203  null,
1204  null,
1205  OperandTypes.family(getSignatureFamilies()),
1207  }
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 1224 of file HeavyDBSqlOperatorTable.java.

1226  {
1227  assert functionQualifier == null;
1228  switch (operands.length) {
1229  case 2:
1230  operands = new SqlNode[] {
1231  operands[0], operands[1], SqlLiteral.createCharString("", pos)};
1232  break;
1233  case 3:
1234  break;
1235  default:
1236  throw new IllegalArgumentException(
1237  "Invalid operand count " + Arrays.toString(operands));
1238  }
1239  return super.createCall(functionQualifier, pos, operands);
1240  }
static java.util.List<SqlTypeFamily> com.mapd.calcite.parser.HeavyDBSqlOperatorTable.Replace.getSignatureFamilies ( )
inlinestaticprivate

Definition at line 1209 of file HeavyDBSqlOperatorTable.java.

References heavydb.dtypes.STRING.

1209  {
1210  java.util.ArrayList<SqlTypeFamily> families =
1211  new java.util.ArrayList<SqlTypeFamily>();
1212  families.add(SqlTypeFamily.STRING);
1213  families.add(SqlTypeFamily.STRING);
1214  families.add(SqlTypeFamily.STRING);
1215  return families;
1216  }
tuple STRING
Definition: dtypes.py:31
RelDataType com.mapd.calcite.parser.HeavyDBSqlOperatorTable.Replace.inferReturnType ( SqlOperatorBinding  opBinding)
inline

Definition at line 1219 of file HeavyDBSqlOperatorTable.java.

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

Definition at line 1243 of file HeavyDBSqlOperatorTable.java.

1243  {
1244  // if there are only 2 Operands, the code will be creating 'defaults'
1245  return (operands.size() == 2);
1246  }

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