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

Improve materialized view rewriting coverage with disjunctive predicates

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.20.0
    • core

    Description

      For instance, in the following case:

      @Test public void testJoinAggregateMaterializationAggregateFuncs14() {
        checkMaterialize(
            "select \"empid\", \"emps\".\"name\", \"emps\".\"deptno\", \"depts\".\"name\", "
                + "count(*) as c, sum(\"empid\") as s\n"
                + "from \"emps\" join \"depts\" using (\"deptno\")\n"
                + "where (\"depts\".\"name\" is not null and \"emps\".\"name\" = 'a') or "
                + "(\"depts\".\"name\" is not null and \"emps\".\"name\" = 'b')\n"
                + "group by \"empid\", \"emps\".\"name\", \"depts\".\"name\", \"emps\".\"deptno\"",
            "select \"depts\".\"deptno\", sum(\"empid\") as s\n"
                + "from \"emps\" join \"depts\" using (\"deptno\")\n"
                + "where \"depts\".\"name\" is not null and \"emps\".\"name\" = 'a'\n"
                + "group by \"depts\".\"deptno\"",
            HR_FKUK_MODEL,
            CONTAINS_M0);
      }
      

      Attachments

        Activity

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

          People

            jcamachorodriguez Jesus Camacho Rodriguez
            jcamachorodriguez Jesus Camacho Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            2 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 - 20m
                20m

                Slack

                  Issue deployment