You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Zhen Chen (Jira)" <ji...@apache.org> on 2025/10/17 08:16:00 UTC
[jira] [Created] (CALCITE-7234) Enable Trait Satisfaction for FD-Optimized Collations
Zhen Chen created CALCITE-7234:
----------------------------------
Summary: Enable Trait Satisfaction for FD-Optimized Collations
Key: CALCITE-7234
URL: https://issues.apache.org/jira/browse/CALCITE-7234
Project: Calcite
Issue Type: Improvement
Components: core
Affects Versions: 1.40.0
Reporter: Zhen Chen
**Problem:**
When "SortRemoveDuplicateKeysRule" removes redundant sort keys (based on functional dependencies), the Volcano optimizer rejects the simplified Sort because the optimized collation doesn't strictly match the original prefix.
**Example:**
- Original collation: [0, 1](sort by field 0, then field 1)
- Optimized collation: [0](field 1 is functionally determined by field 0)
The optimizer requires exact prefix matching, even though the optimized collation is semantically equivalent. This prevents "SortRemoveDuplicateKeysRule" from working effectively in VolcanoPlanner.
**Solution:**
Modify trait satisfaction logic to recognize FD-optimized collations as valid when they preserve semantic ordering.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)