kylin-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "apache_dev@163.com" <apache_...@163.com>
Subject Re: Re: query Sql run Error
Date Fri, 04 Aug 2017 02:00:53 GMT

Is it a bug to be sure?Is there any way around this issue?

this sql cann't work

select F16,sum(F0) from 
 (
select T8.PART_DT as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  from 

(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0

from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
 
inner join KYLIN_CAL_DT T17 
on T8.PART_DT = T17.CAL_DT
) T7  
group by F16


but when i remove   join sql

inner join KYLIN_CAL_DT T17 
on T8.PART_DT = T17.CAL_DT

is can work.



select F16,sum(F0) from 
 (
select T8.PART_DT as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  from 

(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0

from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
) T7  
group by F16



apache_dev@163.com
 
From: apache_dev@163.com
Date: 2017-08-02 12:41
To: dev
Subject: Re: Re: query Sql run Error

 I would like to explain  one  point ,first sql is Bi(smartbi) tools auto created,This example
has normal typical.




apache_dev@163.com
 
From: apache_dev@163.com
Date: 2017-08-01 18:36
To: dev
Subject: Re: Re: query Sql run Error
thinks,

  Kylin2.0 on HDP2.5.3.



 sql is not work.
   select T7.F16 as F3,SUM(T7.F0) as F4  
from (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17 
inner join 
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0

from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
on T8.PART_DT = T17.CAL_DT
) T7  
group by T7.F16



but this sql can work normal.

  select T7.F16 as F3,SUM(T7.F0) as F4  from
(
select F16,F0 from 
 (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17 
inner join 
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0

from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
on T8.PART_DT = T17.CAL_DT
) T7  
group by F16,F0
) T7
group by T7.F16







apache_dev@163.com
 
From: Billy Liu
Date: 2017-08-01 17:28
To: dev
Subject: Re: query Sql run Error
please check log first.
 
2017-08-01 16:08 GMT+08:00 apache_dev@163.com <apache_dev@163.com>:
 
> Hi,
>
>  Kylin2.0 on HDP2.5.3.
>
>  sql is not work.
>    select T7.F16 as F3,SUM(T7.F0) as F4
> from (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by T7.F16
>
> but this sql can work
>
>   select T7.F16 as F3,SUM(T7.F0) as F4  from
> (
> select F16,F0 from
>  (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by F16,F0
> ) T7
> group by T7.F16
>
> What's the reason?
>
>
>
> apache_dev@163.com
>
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message