[ 
https://issues.apache.org/jira/browse/CARBONDATA-2541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16536773#comment-16536773
 ] 

Ravindra Pesala commented on CARBONDATA-2541:
---------------------------------------------

It is not valid, Filter conditions should be the same as present in MV. 

Please close it as invalid.

> MV Dataset - When MV satisfy filter condition but not exact same condition 
> given during MV creation, then the user query is not accessing the data from 
> MV.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CARBONDATA-2541
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2541
>             Project: CarbonData
>          Issue Type: Bug
>          Components: data-query
>            Reporter: Prasanna Ravichandran
>            Assignee: xubo245
>            Priority: Minor
>              Labels: Carbondata, MV, Materialistic_Views
>         Attachments: data.csv
>
>
> MV Dataset - When MV satisfy filter condition but not exact same condition 
> given during MV creation, then the user query is not accessing the data from 
> MV.
> Test queries - spark shell:
> scala>carbon.sql("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'").show()
> ++
> ||
> ++
> ++
>  
> scala>carbon.sql("LOAD DATA local inpath 
> 'hdfs://hacluster/user/prasanna/data.csv' INTO TABLE originTable 
> OPTIONS('DELIMITER'= ',', 'QUOTECHAR'= 
> '\"','timestampformat'='dd-MM-yyyy')").show()
> ++
> ||
> ++
> ++
>  
> scala> carbon.sql("create datamap mv_project3 using 'mv' as select 
> projectenddate,empno from originTable where empno>10").show(200,false)
> ++
> ||
> ++
> ++
> scala> carbon.sql(" rebuild datamap mv_project3").show(200,false)
> ++
> ||
> ++
> ++
> scala> carbon.sql(" explain select projectenddate,empno from originTable 
> where empno>15").show(200,false)
> +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> |plan |
> +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> |== CarbonData Profiler ==
> Table Scan on origintable
>  - total blocklets: 2
>  - filter: (empno <> null and empno > 15)
>  - pruned by Main DataMap
>  - skipped blocklets: 0
>  |
> |== Physical Plan ==
> *BatchedScan CarbonDatasourceHadoopRelation [ Database name :default, Table 
> name :origintable, Schema 
> :Some(StructType(StructField(empno,IntegerType,true), 
> StructField(empname,StringType,true), 
> StructField(designation,StringType,true), 
> StructField(doj,TimestampType,true), 
> StructField(workgroupcategory,IntegerType,true), 
> StructField(workgroupcategoryname,StringType,true), 
> StructField(deptno,IntegerType,true), StructField(deptname,StringType,true), 
> StructField(projectcode,IntegerType,true), 
> StructField(projectjoindate,TimestampType,true), 
> StructField(projectenddate,TimestampType,true), 
> StructField(attendance,IntegerType,true), 
> StructField(utilization,IntegerType,true), 
> StructField(salary,IntegerType,true))) ] 
> default.origintable[projectenddate#3095,empno#3085] PushedFilters: 
> [IsNotNull(empno), GreaterThan(empno,15)]|
> +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
>  
>  



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

Reply via email to