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

Infer collation of Project using monotonicity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0-incubating
    • core
    • 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-0.patch
          2 kB
          Milinda Pathirage
        2. CALCITE-783-1.patch
          56 kB
          Milinda Pathirage

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: