From bdfb17029f7e205f895dc3dfd0f37c8ff2520823 Mon Sep 17 00:00:00 2001 From: rubenada Date: Fri, 21 Jul 2023 10:20:12 +0100 Subject: [PATCH] [CALCITE-5865] ClassCastException with FLOOR and CEIL on conformances that are not builtin (follow-up) --- .../java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java index 86a7cb0a0acc..65bb44e9e7e3 100644 --- a/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java +++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java @@ -2702,7 +2702,7 @@ public static SqlOperator like(boolean negated, boolean caseSensitive) { /** Returns the operator for {@code FLOOR} and {@code CEIL} with given floor flag * and library. */ public static SqlOperator floorCeil(boolean floor, SqlConformance conformance) { - if (SqlConformanceEnum.BIG_QUERY.equals(conformance)) { + if (SqlConformanceEnum.BIG_QUERY == conformance) { return floor ? SqlLibraryOperators.FLOOR_BIG_QUERY : SqlLibraryOperators.CEIL_BIG_QUERY; } else { return floor ? SqlStdOperatorTable.FLOOR : SqlStdOperatorTable.CEIL;