protected SqlNode emulateNullDirectionWithIsNull(SqlNode node, boolean nullsFirst, boolean desc) { // No need for emulation if the nulls will anyways come out the way we want // them based on "nullsFirst" and "desc". if (nullCollation.isDefaultOrder(nullsFirst, desc)) { return null; } node = SqlStdOperatorTable.IS_NULL.createCall(SqlParserPos.ZERO, node); if (nullsFirst) { node = SqlStdOperatorTable.DESC.createCall(SqlParserPos.ZERO, node); } return node; }
protected SqlNode emulateNullDirectionWithIsNull(SqlNode node, boolean nullsFirst, boolean desc) { // No need for emulation if the nulls will anyways come out the way we want // them based on "nullsFirst" and "desc". if (nullCollation.isDefaultOrder(nullsFirst, desc)) { return null; } node = SqlStdOperatorTable.IS_NULL.createCall(SqlParserPos.ZERO, node); if (nullsFirst) { node = SqlStdOperatorTable.DESC.createCall(SqlParserPos.ZERO, node); } return node; }