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

SESSION_END() is transformed to RexInputRef, which is always equal to SESSION_START()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql2rel/AuxiliaryConverter.java#L56

      In the AuxiliaryConverter implementation, SESSION_END() is transformed to a RexInputRef, as the same as SESSION_START(). By doing so, it cannot restored when generating physical plan because it cannot be differentiated which RexInputRef is session start, and which RexInputRef is session end.

      Ideally, during toRel, SESSION_END can be kept as a RexCall with function information in it. So in the following step, the RexCall can be replaced as a correct input reference to GROUP BY's field.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              amaliujia Rui Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: