You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by "apache_dev@163.com" <ap...@163.com> on 2017/07/26 03:47:12 UTC

sum function error

Hi,
   when i run sum function,get a error result:






Hive table,no lookup table

create table tem(a varchar(1),b bigint,c bigint);

insert into tem values('A',null,1);
insert into tem values('A',1,1);
insert into tem values('A',2,1);
insert into tem values('B',3,1);
insert into tem values('B',1,1);
insert into tem values('C',4,1);






apache_dev@163.com

Re: Re: sum function error download URL: http://pan.baidu.com/s/1slFedyt

Posted by "apache_dev@163.com" <ap...@163.com>.
Sorry,

  Kylin2.0 on HDP2.5.3

  step printscreent in word,download url,please view in mail subject.



apache_dev@163.com
 
From: Billy Liu
Date: 2017-07-26 22:51
To: dev
Subject: Re: sum function error
When you describe something is wrong, could you show the reproduce steps,
versions, expected result and your analysis?
For example, which kylin version, what measure and dimensions have been
defined, what's your expected SUM result? What's the actual result.
 
2017-07-26 14:16 GMT+08:00 apache_dev@163.com <ap...@163.com>:
 
>
> Photo maybe cann't open.
>
>   I run insight:
>
>     select sum(TEM.C) from TEM,result is wrong
>
> but run:
>       select sum(TEM.B) from TEM,result is right
>
>
> apache_dev@163.com
>
> From: apache_dev@163.com
> Date: 2017-07-26 11:47
> To: dev
> Subject: sum function error
> Hi,
>    when i run sum function,get a error result:
>
>
>
>
>
>
> Hive table,no lookup table
>
> create table tem(a varchar(1),b bigint,c bigint);
>
> insert into tem values('A',null,1);
> insert into tem values('A',1,1);
> insert into tem values('A',2,1);
> insert into tem values('B',3,1);
> insert into tem values('B',1,1);
> insert into tem values('C',4,1);
>
>
>
>
>
>
> apache_dev@163.com
>

Re: Re: sum function error

Posted by "apache_dev@163.com" <ap...@163.com>.
Yes ,3ks.



apache_dev@163.com
 
From: ShaoFeng Shi
Date: 2017-07-27 11:25
To: dev
Subject: Re: Re: sum function error
I know what's the problem now, after checking your document.
 
You defined A, B, C as dimensions, with no measure, and then query "SUM(B),
SUM(C) GROUP BY A". Although it can be queried, but the result is not
expected.
 
You need define measure "SUM(B)" AND "SUM(C)" in Cube, leave only A as
dimension. Then re-build the Cube and try. The old Cube should be disabled
or deleted also.
 
2017-07-27 10:57 GMT+08:00 apache_dev@163.com <ap...@163.com>:
 
> sorry,
>
>   printScreen File(2.4M) is too large for mail server,could you download
> it in attachments url:
>
>
>
> ------------------------------
> apache_dev@163.com
>
>
> *From:* Billy Liu <bi...@apache.org>
> *Date:* 2017-07-26 22:51
> *To:* dev <de...@kylin.apache.org>
> *Subject:* Re: sum function error
> When you describe something is wrong, could you show the reproduce steps,
> versions, expected result and your analysis?
> For example, which kylin version, what measure and dimensions have been
> defined, what's your expected SUM result? What's the actual result.
>
> 2017-07-26 14:16 GMT+08:00 apache_dev@163.com <ap...@163.com>:
>
> >
> > Photo maybe cann't open.
> >
> >   I run insight:
> >
> >     select sum(TEM.C) from TEM,result is wrong
> >
> > but run:
> >       select sum(TEM.B) from TEM,result is right
> >
> >
> > apache_dev@163.com
> >
> > From: apache_dev@163.com
> > Date: 2017-07-26 11:47
> > To: dev
> > Subject: sum function error
> > Hi,
> >    when i run sum function,get a error result:
> >
> >
> >
> >
> >
> >
> > Hive table,no lookup table
> >
> > create table tem(a varchar(1),b bigint,c bigint);
> >
> > insert into tem values('A',null,1);
> > insert into tem values('A',1,1);
> > insert into tem values('A',2,1);
> > insert into tem values('B',3,1);
> > insert into tem values('B',1,1);
> > insert into tem values('C',4,1);
> >
> >
> >
> >
> >
> >
> > apache_dev@163.com
> >
>
>
 
 
-- 
Best regards,
 
Shaofeng Shi 史少锋

Re: Re: sum function error

Posted by ShaoFeng Shi <sh...@apache.org>.
I know what's the problem now, after checking your document.

You defined A, B, C as dimensions, with no measure, and then query "SUM(B),
SUM(C) GROUP BY A". Although it can be queried, but the result is not
expected.

You need define measure "SUM(B)" AND "SUM(C)" in Cube, leave only A as
dimension. Then re-build the Cube and try. The old Cube should be disabled
or deleted also.

2017-07-27 10:57 GMT+08:00 apache_dev@163.com <ap...@163.com>:

> sorry,
>
>   printScreen File(2.4M) is too large for mail server,could you download
> it in attachments url:
>
>
>
> ------------------------------
> apache_dev@163.com
>
>
> *From:* Billy Liu <bi...@apache.org>
> *Date:* 2017-07-26 22:51
> *To:* dev <de...@kylin.apache.org>
> *Subject:* Re: sum function error
> When you describe something is wrong, could you show the reproduce steps,
> versions, expected result and your analysis?
> For example, which kylin version, what measure and dimensions have been
> defined, what's your expected SUM result? What's the actual result.
>
> 2017-07-26 14:16 GMT+08:00 apache_dev@163.com <ap...@163.com>:
>
> >
> > Photo maybe cann't open.
> >
> >   I run insight:
> >
> >     select sum(TEM.C) from TEM,result is wrong
> >
> > but run:
> >       select sum(TEM.B) from TEM,result is right
> >
> >
> > apache_dev@163.com
> >
> > From: apache_dev@163.com
> > Date: 2017-07-26 11:47
> > To: dev
> > Subject: sum function error
> > Hi,
> >    when i run sum function,get a error result:
> >
> >
> >
> >
> >
> >
> > Hive table,no lookup table
> >
> > create table tem(a varchar(1),b bigint,c bigint);
> >
> > insert into tem values('A',null,1);
> > insert into tem values('A',1,1);
> > insert into tem values('A',2,1);
> > insert into tem values('B',3,1);
> > insert into tem values('B',1,1);
> > insert into tem values('C',4,1);
> >
> >
> >
> >
> >
> >
> > apache_dev@163.com
> >
>
>


-- 
Best regards,

Shaofeng Shi 史少锋

Re: Re: sum function error

Posted by "apache_dev@163.com" <ap...@163.com>.
sorry,

  printScreen File(2.4M) is too large for mail server,could you download it in attachments url:

  



apache_dev@163.com
 
From: Billy Liu
Date: 2017-07-26 22:51
To: dev
Subject: Re: sum function error
When you describe something is wrong, could you show the reproduce steps,
versions, expected result and your analysis?
For example, which kylin version, what measure and dimensions have been
defined, what's your expected SUM result? What's the actual result.
 
2017-07-26 14:16 GMT+08:00 apache_dev@163.com <ap...@163.com>:
 
>
> Photo maybe cann't open.
>
>   I run insight:
>
>     select sum(TEM.C) from TEM,result is wrong
>
> but run:
>       select sum(TEM.B) from TEM,result is right
>
>
> apache_dev@163.com
>
> From: apache_dev@163.com
> Date: 2017-07-26 11:47
> To: dev
> Subject: sum function error
> Hi,
>    when i run sum function,get a error result:
>
>
>
>
>
>
> Hive table,no lookup table
>
> create table tem(a varchar(1),b bigint,c bigint);
>
> insert into tem values('A',null,1);
> insert into tem values('A',1,1);
> insert into tem values('A',2,1);
> insert into tem values('B',3,1);
> insert into tem values('B',1,1);
> insert into tem values('C',4,1);
>
>
>
>
>
>
> apache_dev@163.com
>

Re: Re: sum function error URL: http://pan.baidu.com/s/1slFedyt

Posted by "apache_dev@163.com" <ap...@163.com>.
sorry,

  printScreen File(2.4M) is too large for mail server,could you download it in attachments url,  maybe attachments mail was intercepted ,please view mail subject





apache_dev@163.com
 
From: Billy Liu
Date: 2017-07-26 22:51
To: dev
Subject: Re: sum function error
When you describe something is wrong, could you show the reproduce steps,
versions, expected result and your analysis?
For example, which kylin version, what measure and dimensions have been
defined, what's your expected SUM result? What's the actual result.
 
2017-07-26 14:16 GMT+08:00 apache_dev@163.com <ap...@163.com>:
 
>
> Photo maybe cann't open.
>
>   I run insight:
>
>     select sum(TEM.C) from TEM,result is wrong
>
> but run:
>       select sum(TEM.B) from TEM,result is right
>
>
> apache_dev@163.com
>
> From: apache_dev@163.com
> Date: 2017-07-26 11:47
> To: dev
> Subject: sum function error
> Hi,
>    when i run sum function,get a error result:
>
>
>
>
>
>
> Hive table,no lookup table
>
> create table tem(a varchar(1),b bigint,c bigint);
>
> insert into tem values('A',null,1);
> insert into tem values('A',1,1);
> insert into tem values('A',2,1);
> insert into tem values('B',3,1);
> insert into tem values('B',1,1);
> insert into tem values('C',4,1);
>
>
>
>
>
>
> apache_dev@163.com
>

Re: sum function error

Posted by Billy Liu <bi...@apache.org>.
When you describe something is wrong, could you show the reproduce steps,
versions, expected result and your analysis?
For example, which kylin version, what measure and dimensions have been
defined, what's your expected SUM result? What's the actual result.

2017-07-26 14:16 GMT+08:00 apache_dev@163.com <ap...@163.com>:

>
> Photo maybe cann't open.
>
>   I run insight:
>
>     select sum(TEM.C) from TEM,result is wrong
>
> but run:
>       select sum(TEM.B) from TEM,result is right
>
>
> apache_dev@163.com
>
> From: apache_dev@163.com
> Date: 2017-07-26 11:47
> To: dev
> Subject: sum function error
> Hi,
>    when i run sum function,get a error result:
>
>
>
>
>
>
> Hive table,no lookup table
>
> create table tem(a varchar(1),b bigint,c bigint);
>
> insert into tem values('A',null,1);
> insert into tem values('A',1,1);
> insert into tem values('A',2,1);
> insert into tem values('B',3,1);
> insert into tem values('B',1,1);
> insert into tem values('C',4,1);
>
>
>
>
>
>
> apache_dev@163.com
>

Re: sum function error

Posted by "apache_dev@163.com" <ap...@163.com>.
Photo maybe cann't open.

  I run insight:

    select sum(TEM.C) from TEM,result is wrong

but run:
      select sum(TEM.B) from TEM,result is right


apache_dev@163.com
 
From: apache_dev@163.com
Date: 2017-07-26 11:47
To: dev
Subject: sum function error
Hi,
   when i run sum function,get a error result:






Hive table,no lookup table

create table tem(a varchar(1),b bigint,c bigint);

insert into tem values('A',null,1);
insert into tem values('A',1,1);
insert into tem values('A',2,1);
insert into tem values('B',3,1);
insert into tem values('B',1,1);
insert into tem values('C',4,1);






apache_dev@163.com