commit | 0196bb67a5255b7b0f9e297c74742c4d7203403d | [log] [tgz] |
---|---|---|
author | Haisheng Yuan <h.yuan@alibaba-inc.com> | Sun Jan 19 18:27:59 2020 -0600 |
committer | Haisheng Yuan <15352793+hsyuan@users.noreply.github.com> | Thu Jan 23 13:43:39 2020 -0800 |
tree | 561802a97903370f8c43e863494f442af2215058 | |
parent | 34e4a4ff9010b0a25c0a1546f012184a1a72e2e3 [diff] |
[CALCITE-3744] Duplicate rule matches when RelSet gets merged Some times RelSet can get merged. e.g. Each number represet Rel id, and they are in different RelSet. 1 4 \ / 2 / \ / 3 Assume in the rulequeue, we have rule match with name of 12, 23, 43. For simplicity, omit the rule name, first digit represent the parent RelNode, second represent the child. If after some rule, we merged the set of 3 into the set of 2, and RelNode 4's input is replaced by RelSubset of 2. We will retrigger rules and try to add rulematch 12, 42, 43 into rule queue. 12 will be filtered out, because there is duplicate in the RuleMatch names set. But for 43, it now has different rulematch digest with previous match, because RelNode #4's input RelSubset changed, its digest also changed. So we can't detect the duplication and will re-apply rulematch 43 twice.
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.