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

In RelBuilder, optimize Union(all, Values, Values) to Values

    XMLWordPrintableJSON

    Details

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

      Description

      In RelBuilder, optimize Union(all, Values, Values) to Values. Similarly optimize Project(Values) to Values if the projected expressions are all literals.

      This pattern occurs frequently, if someone writes SELECT 1, 'a' UNION ALL SELECT 2, 'b' for instance.

      Enable this rewrite with a new property boolean RelBuilder.Config.simplifyValues(), default true.

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: