Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-2528

MV Datamap - When the MV is created with the order by, then when we execute the corresponding query defined in MV with order by, then the data is not accessed from the MV.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0, 1.4.1
    • Component/s: data-query
    • Environment:
      3 node Opensource ANT cluster. (Opensource Hadoop 2.7.2+ Opensource Spark 2.2.1+ Opensource Carbondata 1.3.1)

      Description

      When the MV is created with the order by condition, then when we execute the corresponding query defined in MV along with order by, then the data is not accessed from the MV. The data is being accessed from the maintable only. 

      Test queries:

      create datamap MV_order using 'mv' as select empno,sum(salary)+sum(utilization) as total from originTable group by empno order by empno;
      create datamap MV_desc_order using 'mv' as select empno,sum(salary)+sum(utilization) as total from originTable group by empno order by empno DESC;
      rebuild datamap MV_order;
      rebuild datamap MV_desc_order;
      explain select empno,sum(salary)+sum(utilization) as total from originTable group by empno order by empno;
      explain select empno,sum(salary)+sum(utilization) as total from originTable group by empno order by empno DESC;

      Expected result: MV with order by condition should access data from the MV table only.

       

      Please see the attached document for more details.

        Attachments

        1. MV_orderby.docx
          45 kB
          Prasanna Ravichandran
        2. data.csv
          1 kB
          Prasanna Ravichandran

          Issue Links

            Activity

              People

              • Assignee:
                ravi.pesala Ravindra Pesala
                Reporter:
                Prasan Prasanna Ravichandran
              • 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 - 6h
                  6h