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

Decorrelator gives empty result after decorrelating sort rel with null offset and fetch

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.21.0
    • None

    Description

      It seems like I introduced a bug with the recent decorrelator patch. Sort rel with null offset and fetch would end up becoming an empty value since decorrelator would call sortLimit builder with 0 limit and 0 offset. It should pass negative values to builder when values are null.

      https://github.com/apache/calcite/blob/e863294ccfbed9dd520c999f75ed0bbe03f9fb1d/core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java#L423

      Attachments

        Issue Links

          Activity

            People

              Juhwan Juhwan Kim
              Juhwan Juhwan Kim
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 0.5h
                  0.5h