/** * Returns the collating sequence (the collation name) and the coercibility * for the resulting value of a dyadic operator. * * @param col1 first operand for the dyadic operation * @param col2 second operand for the dyadic operation * @return the resulting collation sequence. The "no collating sequence" * result is returned as null. * * @see Glossary#SQL99 SQL:1999 Part 2 Section 4.2.3 Table 2 */ public static SqlCollation getCoercibilityDyadicOperator( SqlCollation col1, SqlCollation col2) { return getCoercibilityDyadic(col1, col2); }
/** * Returns the collating sequence (the collation name) and the coercibility * for the resulting value of a dyadic operator. * * @param col1 first operand for the dyadic operation * @param col2 second operand for the dyadic operation * @return the resulting collation sequence. The "no collating sequence" * result is returned as null. * * @see Glossary#SQL99 SQL:1999 Part 2 Section 4.2.3 Table 2 */ public static SqlCollation getCoercibilityDyadicOperator( SqlCollation col1, SqlCollation col2) { return getCoercibilityDyadic(col1, col2); }
/** * Returns the collating sequence (the collation name) and the coercibility * for the resulting value of a dyadic operator. * * @param col1 first operand for the dyadic operation * @param col2 second operand for the dyadic operation * @return the resulting collation sequence * * @throws org.apache.calcite.runtime.CalciteException from * {@link org.apache.calcite.runtime.CalciteResource#invalidCompare} or * {@link org.apache.calcite.runtime.CalciteResource#differentCollations} * if no collating sequence can be deduced * * @see Glossary#SQL99 SQL:1999 Part 2 Section 4.2.3 Table 2 */ public static SqlCollation getCoercibilityDyadicOperatorThrows( SqlCollation col1, SqlCollation col2) { SqlCollation ret = getCoercibilityDyadic(col1, col2); if (null == ret) { throw RESOURCE.invalidCompare( col1.collationName, "" + col1.coercibility, col2.collationName, "" + col2.coercibility).ex(); } return ret; }
/** * Returns the collating sequence (the collation name) and the coercibility * for the resulting value of a dyadic operator. * * @param col1 first operand for the dyadic operation * @param col2 second operand for the dyadic operation * @return the resulting collation sequence * * @throws org.apache.calcite.runtime.CalciteException from * {@link org.apache.calcite.runtime.CalciteResource#invalidCompare} or * {@link org.apache.calcite.runtime.CalciteResource#differentCollations} * if no collating sequence can be deduced * * @see Glossary#SQL99 SQL:1999 Part 2 Section 4.2.3 Table 2 */ public static SqlCollation getCoercibilityDyadicOperatorThrows( SqlCollation col1, SqlCollation col2) { SqlCollation ret = getCoercibilityDyadic(col1, col2); if (null == ret) { throw RESOURCE.invalidCompare( col1.collationName, "" + col1.coercibility, col2.collationName, "" + col2.coercibility).ex(); } return ret; }