XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core

      Description

      In current code, below matching fails:

      MV:
      select deptno, sum(salary) + 2, sum(commission)
      from emps
      group by deptno
      
      Query:
      select deptno, sum(salary) + 2
      from emps
      group by deptno
      

      The reason is that – after matching of the Aggregates, a compensating Project is added, but afterwards matching fails to handle it.

      This issue proposes to add a rule that match when query and target are both Project and query has a compensating Project as a child. After this issue below case can be handled:

      Query:
          Project(projects: [$0, +($1, 2)])
            Project(projects: [$1, $3, $4])
              Rel-A
      Target:  
          Project(projects: [$1, +($3, 2)])
            Rel-A
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jinxing6042@126.com Jin Xing
                Reporter:
                jinxing6042@126.com Jin Xing
              • Votes:
                0 Vote for this issue
                Watchers:
                1 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 - 0.5h
                  0.5h