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

Add a new component RexNormalize for more effect rex nodes normalization

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Currently, we only have simple normalization such as:

      $2 = $1 => $1 = $2
      $2 > $1 => $1 < $2

      we can extend the logic to more like:

      • put the complex predicates behind, like OR(OR(udf($1), $2), $3) => OR($3, OR(udf($1), $2))
      • put the udf operand behind, like OR(udf($1), $2) => OR($2, udf($1))
      • put the local variables that appears more frequently in the front, which is more user-friendly to code generation because the variable can be cached and reused.

      Also note that, we should allows flexible configuration for switch this function on/off(not a system calcite property now) for downstream users and projects(because the normalization may have some performance trade-off).

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            danny0405 Danny Chen
            danny0405 Danny Chen
            Votes:
            0 Vote for this issue
            Watchers:
            6 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 - 6h 20m
                6h 20m

                Slack

                  Issue deployment