You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Ravindra Pesala (JIRA)" <ji...@apache.org> on 2018/07/09 11:21:00 UTC
[jira] [Commented] (CARBONDATA-2544) [MV] Wrong data displayed with
Filter
[ https://issues.apache.org/jira/browse/CARBONDATA-2544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16536800#comment-16536800 ]
Ravindra Pesala commented on CARBONDATA-2544:
---------------------------------------------
It works fine, Please close this issue.
> [MV] Wrong data displayed with Filter
> --------------------------------------
>
> Key: CARBONDATA-2544
> URL: https://issues.apache.org/jira/browse/CARBONDATA-2544
> Project: CarbonData
> Issue Type: Bug
> Reporter: Babulal
> Assignee: xubo245
> Priority: Major
>
> spark.sql("drop table if exists test1")
> spark.sql("create table test1( name string,country string,age int,salary int) stored by 'carbondata' ")
> spark.sql("insert into test1 select 'name1','USA',12,23")
> spark.sql("create datamap datamv2 using 'mv' as select country,sum(salary) from test1 group by country").show()
> spark.sql("rebuild datamap datamv2")
> spark.sql("select country,sum(salary) from test1 group by country").show(200,false)
> +--------+----------+
> |country|sum(salary)|
> +--------+----------+
> |USA|23|
> +--------+----------+
>
> spark.sql("select country,sum(salary) from test1 where country='USA' group by country").show(200,false)
> +--------+----------+
> |country|sum(salary)|
> +--------+----------+
> +--------+----------+
>
> This is because, select query formation is wrong , filter value is changed to lowercase
> 2018-05-27 00:20:16 INFO CarbonSparkSqlParser:54 - Parsing command: select preAGG() as preAgg, gen_subsumer_0.`country`, gen_subsumer_0.`sum(salary)` as `sum(salary)`
> from
> (select test1.`country`, sum(cast(test1.`salary` as bigint)) as `sum(salary)`
> from
> test1
> group by test1.`country`) gen_subsumer_0
> where
> (gen_subsumer_0.`country` = 'usa')
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)