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

ASF GitHub Bot commented on CARBONDATA-60:
------------------------------------------

GitHub user ravipesala opened a pull request:

    https://github.com/apache/incubator-carbondata/pull/41

    [CARBONDATA-60] Fixed wrong result when using union all

    https://issues.apache.org/jira/browse/CARBONDATA-60

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ravipesala/incubator-carbondata maven-deploy

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-carbondata/pull/41.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #41
    
----
commit 7638e66e35f4000b8ad92feaa4a8dafe9611cdde
Author: ravipesala <[email protected]>
Date:   2016-07-16T09:15:34Z

    Fixed Union bug

----


> wrong result when using union all
> ---------------------------------
>
>                 Key: CARBONDATA-60
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-60
>             Project: CarbonData
>          Issue Type: Bug
>            Reporter: ray
>
> 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)

Reply via email to