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

Remove the first operand of RexCall from SqlWindowTableFunction

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 1.22.0
    • None
    • core
    • None

    Description

      In CALCITE-3382, we introduced TUMBLE window function to replace the deprecated group tumble window.

      But for query

      select *
      from table(tumble(table Shipments, descriptor(rowtime), INTERVAL '1' MINUTE))
      

      the outputs plan is

      LogicalProject(ORDERID=[$0], ROWTIME=[$1], window_start=[$2], window_end=[$3])
        LogicalTableFunctionScan(invocation=[TUMBLE($1, DESCRIPTOR($1), 60000:INTERVAL MINUTE)], rowType=[RecordType(INTEGER ORDERID, TIMESTAMP(0) ROWTIME, TIMESTAMP(0) window_start, TIMESTAMP(0) window_end)])
          LogicalProject(ORDERID=[$0], ROWTIME=[$1])
            LogicalTableScan(table=[[CATALOG, SALES, SHIPMENTS]])
      

      The first operand of TUMBLE rex call is always the last input field, but actually it represents the source table which is the input rel node.

      This issue remove the first operand from the RexCall because it is useless and confusing.

      Attachments

        Issue Links

          Activity

            People

              danny0405 Danny Chen
              danny0405 Danny Chen
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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