Skip to content

Commit

Permalink
AL-9703 Fix query using both = and in operators for the same value (#347
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gleonSun authored May 15, 2024
1 parent cf9e794 commit be078e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/src/main/java/org/apache/calcite/rex/RexSimplify.java
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,9 @@ private <C extends Comparable<C>> RexNode simplifyAnd2ForUnknownAsFalse(
final RexLiteral literal = comparison.literal;
final RexLiteral prevLiteral =
equalityConstantTerms.put(comparison.ref, literal);
if (prevLiteral != null && !literal.equals(prevLiteral)) {
// see https://olapio.atlassian.net/browse/AL-9703
if (prevLiteral != null && !(literal.getTypeName() == prevLiteral.getTypeName()
&& literal.getValue().equals(prevLiteral.getValue()))) {
return rexBuilder.makeLiteral(false);
}
} else if (RexUtil.isReferenceOrAccess(left, true)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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=<int> arguments
calcite.version=1.30.0-kylin-4.x-r08
calcite.version=1.30.0-kylin-4.x-r09
# This is a version to be used from Maven repository. It can be overridden by localAvatica below
calcite.avatica.version=1.20.0

Expand Down

0 comments on commit be078e7

Please sign in to comment.