[CALCITE-5733] Simplify "a = ARRAY[1,2] AND a = ARRAY[2,3]" to "false"
Simplification seem to not take into account that the specified field is of array type. In other words,it can simplify "a = 1 AND a = 2" to "false",but can not simplify “a = ARRAY[1,2] AND a = ARRAY[2,3]” to "false". This change can fix it. Linked to https://issues.apache.org/jira/browse/FLINK-32188, when submitting an SQL task with Flink to test a customized data source connector, I specified to query an array-type field of a temporary table with a fixed-value array. For example, "select * from image-source where URL=ARRAY ['/flink. jpg', '/flink_1. jpg'] AND URL=ARRAY ['/f. jpg', '/f_1. jpg']" can obtain two predicate conditions, this is illogical. Generally speaking, simplifying this SQL condition should not result in any predicates. Changes related to “RexSimplify.java” can fix it.
Hi @YasuoStudyJava. The PR's headline should be formatted like "[CALCITE-5733] YOUR JIRA ISSUE SUMMARY", you can take a look at other PRs. Or the recently merged PR is also a good help to refer to.
OK, I changed it, could you please take a look again to see if it is standardized.
Can you also please add a unit test here? It helps reviewers to understand better.
Can you also please add a unit test here? It helps reviewers to understand better.
I'll have a try to add a test.
Can you also please add a unit test here? It helps reviewers to understand better.
I'll have a try to add a test.
BTW, I seem to not find pom.xml in source code of calcite? @ILuffZhe
Can you also please add a unit test here? It helps reviewers to understand better.
I'll have a try to add a test.
BTW, I seem to not find pom.xml in source code of calcite? @ILuffZhe
We now use Gradle in Calcite, and you can find build.gradle.kts and gradle.properties in root dir.
For more information, you can browse the website.
@YasuoStudyJava we should also consider the case that the RexCall in projection, which the default RexUnknownAs is UNKNOWN, not the same as predicate in where clause.
Can you give an example?
@YasuoStudyJava there are similar tests in RexProgramTest, and you could learn from that.
@YasuoStudyJava there are similar tests in
RexProgramTest, and you could learn from that.
yeah,I know,but I met some problems when I pull the code and build in my IDEA. I am quite unfamiliar with ‘Gradle’, So code format correction and test cases have not started. Now the problem is:
Task :buildSrc:javacc:compileKotlin Could not load entry 89875aab070c1135c15229026edb1371 from remote build cache: Bucket 'calcite-gradle-cache' not found e: file:///E:/calcite/calcite/buildSrc/subprojects/javacc/src/main/kotlin/org/apache/calcite/buildtools/javacc/JavaCCTask.kt:66:13 Unresolved reference: main Task :buildSrc:javacc:compileKotlin FAILED
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.








