You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2020/06/30 23:02:00 UTC

[jira] [Created] (CALCITE-4097) Avoid requesting unnecessary trait request when deriving traits from child inputs

Haisheng Yuan created CALCITE-4097:
--------------------------------------

             Summary: Avoid requesting unnecessary trait request when deriving traits from child inputs
                 Key: CALCITE-4097
                 URL: https://issues.apache.org/jira/browse/CALCITE-4097
             Project: Calcite
          Issue Type: Improvement
          Components: core
            Reporter: Haisheng Yuan


If the child subset is used to derive new traits for
current relnode, the subset will be marked REQUIRED
when registering the new derived relnode and later
will add enforcers between other delivered subsets.
e.g. a MergeJoin request both inputs hash distributed
by [a,b] sorted by [a,b]. If the left input R1 happens to
be distributed by [a], the MergeJoin can derive new
traits from this input and request both input to be
distributed by [a] sorted by [a,b]. In case there is a
alternative R2 with ANY distribution in the left input's
RelSet, we end up with requesting hash distribution
[a] on alternative R2, which is unnecessary and waste,
because we request distribution by [a] because of R1 can
deliver the exact same distribution and we don't need to
enforce properties on other subsets that can't satisfy
the specific trait requirement.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)