Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4097

Avoid requesting unnecessary trait request when deriving traits from child inputs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.24.0
    • core
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hyuan Haisheng Yuan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m