You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by "Ravindra Pesala (JIRA)" <ji...@apache.org> on 2016/08/17 11:03:20 UTC

[jira] [Resolved] (CARBONDATA-60) wrong result when using union all

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

Ravindra Pesala resolved CARBONDATA-60.
---------------------------------------
    Resolution: Fixed

> wrong result when using union all
> ---------------------------------
>
>                 Key: CARBONDATA-60
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-60
>             Project: CarbonData
>          Issue Type: Bug
>    Affects Versions: 0.1.0-incubating
>            Reporter: ray
>            Assignee: Ravindra Pesala
>             Fix For: 0.1.0-incubating
>
>
> the issue can be reproduced by following code:
> the expected result is 1 row, but actual result is 2 rows.
> +---+---+
> | c1|_c1|
> +---+---+
> |200|  1|
> |279|  1|
> +---+---+
>     import cc.implicits._
>     val df=sc.parallelize(1 to 1000).map(x => (x+"", (x+100)+"")).toDF("c1", "c2")
>     import org.carbondata.spark._
>     df.saveAsCarbonFile(Map("tableName" -> "carbon1"))
>     cc.sql("""
>     select c1,count(*) from(
>       select c1 as c1,c2 as c2 from carbon1
>       union all
>       select c2 as c1,c1 as c2 from carbon1
>      )t
>       where c1='200'
>       group by c1
>     """).show()



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)