[jira] [Created] (CALCITE-5193) Push filter whose conditions include join keys and are composed by OR into inputs of full join
Chunwei Lei created CALCITE-5193: Summary: Push filter whose conditions include join keys and are composed by OR into inputs of full join Key: CALCITE-5193 URL: https://issues.apache.org/jira/browse/CALCITE-5193 Project: Calcite Issue Type: Improvement Reporter: Chunwei Lei For example, {code:java} select * from a full join b on a.id=b.id where a.id=1 or b.id=2 {code} can be transformed to {code:java} select * from (select * from a where id=1) a full join (select * from b where id=2) b on a.id=b.id; {code} If {{a}} and {{b}} are both partitioned tables and id is the partition key, we can do partition pruning with this transformation, which is a big improvement. This improvement is inspired by query {code:java} select * from a full join b on a.id=b.id and a.pt=b.pt where COALESCE(a.pt, b.pt)='20220601'; {code} which costs a lot due to it scans all partitions in table a and b. -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Created] (CALCITE-5192) CodeGenerationBenchmark throws IllegalStateException
Benchao Li created CALCITE-5192: --- Summary: CodeGenerationBenchmark throws IllegalStateException Key: CALCITE-5192 URL: https://issues.apache.org/jira/browse/CALCITE-5192 Project: Calcite Issue Type: Improvement Affects Versions: 1.30.0 Reporter: Benchao Li Assignee: Benchao Li {{CodeGenerationBenchmark}} will throw {{IllegalStateException}} because {{IClassBodyEvaluator}} has state and do not allow to be reused. {code:java} java.lang.IllegalStateException: Must only be called before "cook()" at org.codehaus.janino.SimpleCompiler.assertUncooked(SimpleCompiler.java:482) at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:234) at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:294) at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:288) at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:267) at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:52) at org.codehaus.janino.ClassBodyEvaluator.createInstance(ClassBodyEvaluator.java:428) at org.apache.calcite.adapter.enumerable.CodeGenerationBenchmark.getBindableNoCache(CodeGenerationBenchmark.java:249) at org.apache.calcite.adapter.enumerable.jmh_generated.CodeGenerationBenchmark_getBindableNoCache_jmhTest.getBindableNoCache_thrpt_jmhStub(CodeGenerationBenchmark_getBindableNoCache_jmhTest.java:122) at org.apache.calcite.adapter.enumerable.jmh_generated.CodeGenerationBenchmark_getBindableNoCache_jmhTest.getBindableNoCache_Throughput(CodeGenerationBenchmark_getBindableNoCache_jmhTest.java:85) {code} -- This message was sent by Atlassian Jira (v8.20.7#820007)