[jira] [Created] (CARBONDATA-2526) MV datamap - When the MV datamap is created for the operators: sum(col1)+sum(col2) then when we execute a query of sum(col1+col2) it is not accessing the data from the MV.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (CARBONDATA-2526) MV datamap - When the MV datamap is created for the operators: sum(col1)+sum(col2) then when we execute a query of sum(col1+col2) it is not accessing the data from the MV.

Akash R Nilugal (Jira)
Prasanna Ravichandran created CARBONDATA-2526:
-------------------------------------------------

             Summary: MV datamap - When the MV datamap is created for the operators: sum(col1)+sum(col2) then when we execute a query of sum(col1+col2) it is not accessing the data from the MV.
                 Key: CARBONDATA-2526
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2526
             Project: CarbonData
          Issue Type: Bug
          Components: data-query
         Environment: 3 Node Opensource ANT cluster.
            Reporter: Prasanna Ravichandran
         Attachments: Arithmetic.docx

When the MV datamap is created for the operators like: sum(col1)+sum(col2) then when we execute a query like sum(col1+col2), then it is not accessing the data from the created MV.

Test queries:

CREATE TABLE originTable (empno int, empname String, designation String, doj Timestamp,
workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
utilization int,salary int)
STORED BY 'org.apache.carbondata.format';

LOAD DATA local inpath 'hdfs://hacluster/user/prasanna/data.csv' INTO TABLE originTable OPTIONS('DELIMITER'= ',', 'QUOTECHAR'= '"','timestampformat'='dd-MM-yyyy');

create datamap arithmetic_op using 'mv' as select empno,sum(salary)+sum(utilization) as total , sum(salary)/sum(utilization) as updownratio from originTable where empno>10 group by empno;
explain select empno,sum(salary)+sum(utilization) as total , sum(salary)/sum(utilization) as updownratio from originTable where empno>10 group by empno;

explain select empno,sum(salary+utilization) as total from originTable where empno>10 group by empno;

!image-2018-05-24-19-32-00-314.png!

As   sum(col1)+sum(col2) = sum(col1+col2) are equal, it should point to the same datamap.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)