Skip to content

Commit be078e7

Browse files
authored
AL-9703 Fix query using both = and in operators for the same value (#347)
1 parent cf9e794 commit be078e7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/src/main/java/org/apache/calcite/rex/RexSimplify.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1676,7 +1676,9 @@ private <C extends Comparable<C>> RexNode simplifyAnd2ForUnknownAsFalse(
16761676
final RexLiteral literal = comparison.literal;
16771677
final RexLiteral prevLiteral =
16781678
equalityConstantTerms.put(comparison.ref, literal);
1679-
if (prevLiteral != null && !literal.equals(prevLiteral)) {
1679+
// see https://olapio.atlassian.net/browse/AL-9703
1680+
if (prevLiteral != null && !(literal.getTypeName() == prevLiteral.getTypeName()
1681+
&& literal.getValue().equals(prevLiteral.getValue()))) {
16801682
return rexBuilder.makeLiteral(false);
16811683
}
16821684
} else if (RexUtil.isReferenceOrAccess(left, true)

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
2727
# This is version for Calcite itself
2828
# Note: it should not include "-SNAPSHOT" as it is automatically added by build.gradle.kts
2929
# Release version can be generated by using -Prelease or -Prc=<int> arguments
30-
calcite.version=1.30.0-kylin-4.x-r08
30+
calcite.version=1.30.0-kylin-4.x-r09
3131
# This is a version to be used from Maven repository. It can be overridden by localAvatica below
3232
calcite.avatica.version=1.20.0
3333

0 commit comments

Comments
 (0)