commit | d7b3c83e06e4a63e5cb97c6f93b66795556d53db | [log] [tgz] |
---|---|---|
author | Stamatis Zampetakis <zabetak@gmail.com> | Thu Mar 11 11:38:52 2021 +0100 |
committer | Stamatis Zampetakis <zabetak@gmail.com> | Thu Apr 29 15:31:59 2021 +0200 |
tree | 58218d8ef7d6ef4417dfe580d4a4a0d8ecaa6fab | |
parent | 8c2228eaf8ccc05ae58778276e760092557f78cc [diff] |
[CALCITE-4560] Wrong plan when decorrelating EXISTS subquery with COALESCE in the predicate 1. Add plan transformations before starting the core RelDecorrelator logic to bring the plan into an equivalent but more convenient form that can be decorrelated into more efficient and correct plans. 2. Based on the changes above many plans with subqueries become more efficient since the value generator is no longer necessary and it is dropped. 3. Add test cases in SqlToRelConverter, subquery.iq reproducing the problem (bad plan/query results) and update existing tests based on the changes. Close apache/calcite#2406
Apache Calcite is a dynamic data management framework.
It contains many of the pieces that comprise a typical database management system but omits the storage primitives. It provides an industry standard SQL parser and validator, a customisable optimizer with pluggable rules and cost functions, logical and physical algebraic operators, various transformation algorithms from SQL to algebra (and the opposite), and many adapters for executing SQL queries over Cassandra, Druid, Elasticsearch, MongoDB, Kafka, and others, with minimal configuration.
For more details, see the home page.