You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "JingDas (Jira)" <ji...@apache.org> on 2023/08/09 03:06:00 UTC

[jira] [Created] (CALCITE-5913) Support to get functional dependency metadata in RelMetadataQuery

JingDas created CALCITE-5913:
--------------------------------

             Summary: Support to get functional dependency metadata in RelMetadataQuery
                 Key: CALCITE-5913
                 URL: https://issues.apache.org/jira/browse/CALCITE-5913
             Project: Calcite
          Issue Type: New Feature
            Reporter: JingDas
            Assignee: JingDas


Functional dependency analysis can be applied to various problems in query optimization:
selectivity estimation, estimation of (intermediate) result sizes, *order optimization*
*(in particular sort avoidance),* cost estimation, and various problems in the area of semantic query optimization, as said in the paper《Exploiting Functional Dependence in Query Optimization》

 

In calcite, it may be meta something like 'FunctionalDependency' BuiltInMetadata as following:
{code:java}
public abstract class BuiltInMetadata {
   // ...

   public interface FunctionalDependency extends Metadata {
       /** Returns whether column is functionally dependent on columns. */
       Boolean functionallyDetermine(ImmutableBitSet columns, int column);
   }
} {code}
 

As the book said, functional dependency analysis is a valuable and challenging work. I think support order optimization
(in particular sort avoidance) by the relevant functional dependency metadata firstly, and then complete to get functional dependency function step by step.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)