kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Na Zhai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KYLIN-2253) sql union did not remove duplicated records (distinct)
Date Wed, 08 Aug 2018 09:26:00 GMT

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

Na Zhai commented on KYLIN-2253:
--------------------------------

I have verified with kylin 2.4 which calcite version is 1.13.0. It didn't happen. Sql with
'union' didn't have repeat data. Sql with 'union all' had many repeat data.

> sql union  did not remove duplicated records (distinct)
> -------------------------------------------------------
>
>                 Key: KYLIN-2253
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2253
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v1.5.4.1
>         Environment: apache-kylin-1.6.0-hbase1.x-bin.tar.gz
>            Reporter: zhou degao
>            Priority: Critical
>             Fix For: v2.5.0
>
>
> sql like following:
> select "LOOKUP_TIME_BY_DAY"."THE_YEAR" as "c0", "LOOKUP_TIME_BY_DAY"."MONTH_OF_YEAR"
as "c1" from "VCGBI_FACT_SALE" as "VCGBI_FACT_SALE" join "LOOKUP_TIME_BY_DAY" as "LOOKUP_TIME_BY_DAY"
on "VCGBI_FACT_SALE"."DEAL_TIME" = "LOOKUP_TIME_BY_DAY"."THE_DATE" group by "LOOKUP_TIME_BY_DAY"."THE_YEAR",
"LOOKUP_TIME_BY_DAY"."MONTH_OF_YEAR"
> union
> select "LOOKUP_TIME_BY_DAY"."THE_YEAR" as "c0", "LOOKUP_TIME_BY_DAY"."MONTH_OF_YEAR"
as "c1" from "VCGBI_FACT_PERSON_MISC_DATA" as "VCGBI_FACT_PERSON_MISC_DATA" join "LOOKUP_TIME_BY_DAY"
as "LOOKUP_TIME_BY_DAY" on "VCGBI_FACT_PERSON_MISC_DATA"."TIME" = "LOOKUP_TIME_BY_DAY"."THE_DATE"
group by "LOOKUP_TIME_BY_DAY"."THE_YEAR", "LOOKUP_TIME_BY_DAY"."MONTH_OF_YEAR" order by 1
ASC, 2 ASC
> I got result like following:
> 2016	1
> 2016	1
> 2016	2
> 2016	2
> 2016	3
> 2016	3
> 2016	4
> 2016	4
> 2016	5
> 2016	5
> 2016	6
> 2016	6
> 2016	7
> 2016	7
> 2016	8
> 2016	8
> 2016	9
> 2016	9
> 2016	10
> 2016	11
> 2016	12



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

Mime
View raw message