1320 assert functionQualifier == null;
1321 final int num_operands = operands.length;
1322 if (num_operands < 2 || num_operands > 6) {
1323 throw new IllegalArgumentException(
1324 "Invalid operand count " + Arrays.toString(operands));
1326 SqlNode[] new_operands =
new SqlNode[6];
1328 new_operands[0] = operands[0];
1330 new_operands[1] = operands[1];
1332 if (num_operands < 3 || operands[2] == null) {
1333 new_operands[2] = SqlLiteral.createCharString(
"", pos);
1335 new_operands[2] = operands[2];
1338 if (num_operands < 4 || operands[3] == null) {
1339 new_operands[3] = SqlLiteral.createExactNumeric(
"1", pos);
1341 new_operands[3] = operands[3];
1344 if (num_operands < 5 || operands[4] == null) {
1345 new_operands[4] = SqlLiteral.createExactNumeric(
"0", pos);
1347 new_operands[4] = operands[4];
1350 if (num_operands < 6 || operands[5] == null) {
1351 new_operands[5] = SqlLiteral.createCharString(
"c", pos);
1353 new_operands[5] = operands[5];
1355 return super.createCall(functionQualifier, pos, new_operands);