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

Infer collation of Project using monotonicity

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0-incubating
    • Component/s: core
    • Labels:
      None

      Description

      Current implementation of RelMdCollation#project doesn't handle function expressions and because of that we loose any collation metadata related to monotonic expressions which can be useful for generating streaming query execution plans involving tumbling windows.

      Following is how current code looks like (RelMdCollation):

      185: for (Ord<RexNode> project : Ord.zip(projects)) {
      186: if (project.e instanceof RexInputRef)

      { 187: targets.put(((RexInputRef) project.e).getIndex(), project.i); 188: }


      189: }

      We only handle projects of type RexInputRef. But to support monotonic expressions we should laso handle projects of type RexCall.

        Attachments

        1. CALCITE-783-1.patch
          56 kB
          Milinda Lakmal Pathirage
        2. CALCITE-783-0.patch
          2 kB
          Milinda Lakmal Pathirage

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                milinda Milinda Lakmal Pathirage
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: