You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by "ChenLiang (JIRA)" <ji...@apache.org> on 2016/07/25 11:57:20 UTC
[jira] [Updated] (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 ]
ChenLiang updated CARBONDATA-60:
--------------------------------
Affects Version/s: Apache CarbonData 0.1.0-incubating
> 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: Apache CarbonData 0.1.0-incubating
> 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)