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

Trimming method for Filter rel uses wrong traitSet

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.21.0
    • Component/s: None

      Description

      It seems like there is a bug here: https://github.com/apache/calcite/blob/e8d598a434e8dbadaf756f8c57c748f4d7e16fdf/core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java#L487.

      Unlike other trimming methods, filter trim function copies the current filter rel and directly pushes it to the builder instead of calling factory method for filter rel. The problem with the current code is that it uses the same traitSet even though it would no longer be valid after trimming its input. For example, fields in collation might have been updated after trimming. We should reflect this change when creating a new rel.

       

        Attachments

          Activity

            People

            • Assignee:
              Juhwan Juhwan Kim
              Reporter:
              Juhwan Juhwan Kim

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Issue deployment