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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.27.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: