From 2d37796b99cd57ad1971fad2e319e8ebe005a93f Mon Sep 17 00:00:00 2001 From: Guoliang Sun Date: Wed, 20 Mar 2024 10:21:45 +0800 Subject: [PATCH] KE-11534 [Follow up]Remove the if operator check --- .../java/org/apache/calcite/sql/fun/SqlLibraryOperators.java | 5 ++++- gradle.properties | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java index ae1fc7ee8c27..c07233380280 100644 --- a/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java +++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java @@ -120,8 +120,11 @@ private SqlLibraryOperators() { }), SqlFunctionCategory.SYSTEM) { @Override public boolean validRexOperands(int count, Litmus litmus) { + // Calcite 1.30 changed the if operator to case when, + // which causes Kylin computable columns to be unusable + return true; // IF is translated to RexNode by expanding to CASE. - return litmus.fail("not a rex operator"); + // return litmus.fail("not a rex operator"); } }; diff --git a/gradle.properties b/gradle.properties index d41aa70ade89..2e79b5aa59a6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,7 +27,7 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true # This is version for Calcite itself # Note: it should not include "-SNAPSHOT" as it is automatically added by build.gradle.kts # Release version can be generated by using -Prelease or -Prc= arguments -calcite.version=1.30.0-kylin-4.x-r03 +calcite.version=1.30.0-kylin-4.x-r04 # This is a version to be used from Maven repository. It can be overridden by localAvatica below calcite.avatica.version=1.20.0