You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Prasanna Ravichandran (JIRA)" <ji...@apache.org> on 2018/05/24 14:08:00 UTC

[jira] [Updated] (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.

     [ https://issues.apache.org/jira/browse/CARBONDATA-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prasanna Ravichandran updated CARBONDATA-2526:
----------------------------------------------
    Attachment: Screenshot_MV.png

> 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
>            Priority: Minor
>              Labels: CarbonData, MV, Materialistic_Views
>         Attachments: Arithmetic.docx, Screenshot_MV.png
>
>
> 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;
> 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)