} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
public boolean checkOperandTypes( SqlCallBinding callBinding, boolean throwOnFailure) { if (!argTypesValid(callBinding)) { if (throwOnFailure) { throw callBinding.newValidationSignatureError(); } return false; } return true; }
/** * Converts a LiteralChain expression: that is, concatenates the operands * immediately, to produce a single literal string. * * <p>Called automatically via reflection. */ public RexNode convertLiteralChain( SqlRexContext cx, SqlLiteralChainOperator op, SqlCall call) { Util.discard(cx); SqlLiteral sum = SqlLiteralChainOperator.concatenateOperands(call); return cx.convertLiteral(sum); }
/** * Converts a LiteralChain expression: that is, concatenates the operands * immediately, to produce a single literal string. * * <p>Called automatically via reflection. */ public RexNode convertLiteralChain( SqlRexContext cx, SqlLiteralChainOperator op, SqlCall call) { Util.discard(cx); SqlLiteral sum = SqlLiteralChainOperator.concatenateOperands(call); return cx.convertLiteral(sum); }
} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
/** * Extracts the string value from a string literal, a chain of string * literals, or a CAST of a string literal. * * @deprecated Use {@link #value(SqlNode)} */ @Deprecated // to be removed before 2.0 public static String stringValue(SqlNode node) { if (node instanceof SqlLiteral) { SqlLiteral literal = (SqlLiteral) node; assert SqlTypeUtil.inCharFamily(literal.getTypeName()); return literal.value.toString(); } else if (SqlUtil.isLiteralChain(node)) { final SqlLiteral literal = SqlLiteralChainOperator.concatenateOperands((SqlCall) node); assert SqlTypeUtil.inCharFamily(literal.getTypeName()); return literal.value.toString(); } else if (node instanceof SqlCall && ((SqlCall) node).getOperator() == SqlStdOperatorTable.CAST) { //noinspection deprecation return stringValue(((SqlCall) node).operand(0)); } else { throw new AssertionError("invalid string literal: " + node); } }
public boolean checkOperandTypes( SqlCallBinding callBinding, boolean throwOnFailure) { if (!argTypesValid(callBinding)) { if (throwOnFailure) { throw callBinding.newValidationSignatureError(); } return false; } return true; }
} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if ("" != null) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if ("" != null) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
/** * Extracts the string value from a string literal, a chain of string * literals, or a CAST of a string literal. * * @deprecated Use {@link #value(SqlNode)} */ @Deprecated // to be removed before 2.0 public static String stringValue(SqlNode node) { if (node instanceof SqlLiteral) { SqlLiteral literal = (SqlLiteral) node; assert SqlTypeUtil.inCharFamily(literal.getTypeName()); return literal.value.toString(); } else if (SqlUtil.isLiteralChain(node)) { final SqlLiteral literal = SqlLiteralChainOperator.concatenateOperands((SqlCall) node); assert SqlTypeUtil.inCharFamily(literal.getTypeName()); return literal.value.toString(); } else if (node instanceof SqlCall && ((SqlCall) node).getOperator() == SqlStdOperatorTable.CAST) { //noinspection deprecation return stringValue(((SqlCall) node).operand(0)); } else { throw new AssertionError("invalid string literal: " + node); } }
} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
/** * Converts a chained string literals into regular literals; returns regular * literals unchanged. * @throws IllegalArgumentException if {@code node} is not a string literal * and cannot be unchained. */ public static SqlLiteral unchain(SqlNode node) { if (node instanceof SqlLiteral) { return (SqlLiteral) node; } else if (SqlUtil.isLiteralChain(node)) { return SqlLiteralChainOperator.concatenateOperands((SqlCall) node); } else if (node instanceof SqlIntervalQualifier) { final SqlIntervalQualifier q = (SqlIntervalQualifier) node; return new SqlLiteral( new SqlIntervalLiteral.IntervalValue(q, 1, q.toString()), q.typeName(), q.pos); } else { throw new IllegalArgumentException("invalid literal: " + node); } }
} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
/** * Converts a chained string literals into regular literals; returns regular * literals unchanged. * @throws IllegalArgumentException if {@code node} is not a string literal * and cannot be unchained. */ public static SqlLiteral unchain(SqlNode node) { if (node instanceof SqlLiteral) { return (SqlLiteral) node; } else if (SqlUtil.isLiteralChain(node)) { return SqlLiteralChainOperator.concatenateOperands((SqlCall) node); } else if (node instanceof SqlIntervalQualifier) { final SqlIntervalQualifier q = (SqlIntervalQualifier) node; return new SqlLiteral( new SqlIntervalLiteral.IntervalValue(q, 1, q.toString()), q.typeName(), q.pos); } else { throw new IllegalArgumentException("invalid literal: " + node); } }
} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
assert node instanceof SqlCall; final SqlLiteral literal = SqlLiteralChainOperator.concatenateOperands((SqlCall) node); assert SqlTypeUtil.inCharFamily(literal.getTypeName()); return (NlsString) literal.value;
} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
assert node instanceof SqlCall; final SqlLiteral literal = SqlLiteralChainOperator.concatenateOperands((SqlCall) node); assert SqlTypeUtil.inCharFamily(literal.getTypeName()); return (NlsString) literal.value;
} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
} else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}