You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by hosur narahari <hn...@gmail.com> on 2018/09/20 03:14:40 UTC

select column returns null values

Hi,

I was trying out kylin with sample-cube example. And when I run "select *
from kylin_sales" query, it returns all the values correctly. But when
I run "select price from kylin_sales", it returns null in all rows.
Price also was coming correctly in first scenario.

One more thing is, first query is pushed down to hive and second one is
fetched from cube. And yes, I've enabled pushdown.

Please let me know if I'm missing something.

Best Regards,
Hari

Re: select column returns null values

Posted by hosur narahari <hn...@gmail.com>.
Hi ShaoFeng,

Thank you. I'll check that.

Best Regards,
Hari

On Mon, 24 Sep 2018, 11:59 ShaoFeng Shi, <sh...@apache.org> wrote:

> Hi Hari,
>
> You're right that Cube has joined data (from fact and lookup tables), and
> then aggregate them by the dimensions. But Kylin doesn't keep the raw data
> after the cube be built, only keep the cuboid (group by certain
> dimensions), so couldn't answer the "select * " without "group by" query.
>
> The logic to pushdown is quite simple today. Please look at QueryService#executeRequest();
> When Cube throws an exception, it redirects to the pushdown engine.
>
> hosur narahari <hn...@gmail.com> 于2018年9月21日周五 上午11:11写道:
>
>> Hi ShaoFeng,
>>
>> Thanks for your response. I've few follow up questions.
>>
>> 1. In FAQ, it's mentioned that "The cube only has aggregated data, so
>> all your queries should be aggregated queries". But since cube is created
>> by joining based on various dimensions, shouldn't joins without aggregation
>> be valid cube querying scenarios(I hope it's already being done).
>>
>> 2. "select price from " statement should also be pushed down, the rule
>> can be optimized for it. Can you point me to documentation for specifying
>> pushdown rules. It would be of big help.
>>
>> Thanks & Regards,
>> Hari
>>
>> On Thu, Sep 20, 2018 at 5:27 PM ShaoFeng Shi <sh...@apache.org>
>> wrote:
>>
>>> Hi Hosur,
>>>
>>> Firstly, please check Kylin's FAQ, search "Why I got an error when
>>> running a “select * “ query?":
>>> https://kylin.apache.org/docs/gettingstarted/faq.html
>>>
>>> Maybe the "select price from " statement should also be pushed down, the
>>> rule of pushdown can be optimized for it.
>>>
>>> hosur narahari <hn...@gmail.com> 于2018年9月20日周四 上午11:15写道:
>>>
>>>> Hi,
>>>>
>>>> I was trying out kylin with sample-cube example. And when I run
>>>> "select * from kylin_sales" query, it returns all the values correctly. But
>>>> when
>>>> I run "select price from kylin_sales", it returns null in all rows.
>>>> Price also was coming correctly in first scenario.
>>>>
>>>> One more thing is, first query is pushed down to hive and second one is
>>>> fetched from cube. And yes, I've enabled pushdown.
>>>>
>>>> Please let me know if I'm missing something.
>>>>
>>>> Best Regards,
>>>> Hari
>>>>
>>>
>>>
>>> --
>>> Best regards,
>>>
>>> Shaofeng Shi 史少锋
>>>
>>>
>
> --
> Best regards,
>
> Shaofeng Shi 史少锋
>
>

Re: select column returns null values

Posted by ShaoFeng Shi <sh...@apache.org>.
Hi Hari,

You're right that Cube has joined data (from fact and lookup tables), and
then aggregate them by the dimensions. But Kylin doesn't keep the raw data
after the cube be built, only keep the cuboid (group by certain
dimensions), so couldn't answer the "select * " without "group by" query.

The logic to pushdown is quite simple today. Please look at
QueryService#executeRequest();
When Cube throws an exception, it redirects to the pushdown engine.

hosur narahari <hn...@gmail.com> 于2018年9月21日周五 上午11:11写道:

> Hi ShaoFeng,
>
> Thanks for your response. I've few follow up questions.
>
> 1. In FAQ, it's mentioned that "The cube only has aggregated data, so all
> your queries should be aggregated queries". But since cube is created by
> joining based on various dimensions, shouldn't joins without aggregation be
> valid cube querying scenarios(I hope it's already being done).
>
> 2. "select price from " statement should also be pushed down, the rule can
> be optimized for it. Can you point me to documentation for specifying
> pushdown rules. It would be of big help.
>
> Thanks & Regards,
> Hari
>
> On Thu, Sep 20, 2018 at 5:27 PM ShaoFeng Shi <sh...@apache.org>
> wrote:
>
>> Hi Hosur,
>>
>> Firstly, please check Kylin's FAQ, search "Why I got an error when
>> running a “select * “ query?":
>> https://kylin.apache.org/docs/gettingstarted/faq.html
>>
>> Maybe the "select price from " statement should also be pushed down, the
>> rule of pushdown can be optimized for it.
>>
>> hosur narahari <hn...@gmail.com> 于2018年9月20日周四 上午11:15写道:
>>
>>> Hi,
>>>
>>> I was trying out kylin with sample-cube example. And when I run
>>> "select * from kylin_sales" query, it returns all the values correctly. But
>>> when
>>> I run "select price from kylin_sales", it returns null in all rows.
>>> Price also was coming correctly in first scenario.
>>>
>>> One more thing is, first query is pushed down to hive and second one is
>>> fetched from cube. And yes, I've enabled pushdown.
>>>
>>> Please let me know if I'm missing something.
>>>
>>> Best Regards,
>>> Hari
>>>
>>
>>
>> --
>> Best regards,
>>
>> Shaofeng Shi 史少锋
>>
>>

-- 
Best regards,

Shaofeng Shi 史少锋

Re: select column returns null values

Posted by hosur narahari <hn...@gmail.com>.
Hi ShaoFeng,

Thanks for your response. I've few follow up questions.

1. In FAQ, it's mentioned that "The cube only has aggregated data, so all
your queries should be aggregated queries". But since cube is created by
joining based on various dimensions, shouldn't joins without aggregation be
valid cube querying scenarios(I hope it's already being done).

2. "select price from " statement should also be pushed down, the rule can
be optimized for it. Can you point me to documentation for specifying
pushdown rules. It would be of big help.

Thanks & Regards,
Hari

On Thu, Sep 20, 2018 at 5:27 PM ShaoFeng Shi <sh...@apache.org> wrote:

> Hi Hosur,
>
> Firstly, please check Kylin's FAQ, search "Why I got an error when running
> a “select * “ query?":
> https://kylin.apache.org/docs/gettingstarted/faq.html
>
> Maybe the "select price from " statement should also be pushed down, the
> rule of pushdown can be optimized for it.
>
> hosur narahari <hn...@gmail.com> 于2018年9月20日周四 上午11:15写道:
>
>> Hi,
>>
>> I was trying out kylin with sample-cube example. And when I run "select *
>> from kylin_sales" query, it returns all the values correctly. But when
>> I run "select price from kylin_sales", it returns null in all rows.
>> Price also was coming correctly in first scenario.
>>
>> One more thing is, first query is pushed down to hive and second one is
>> fetched from cube. And yes, I've enabled pushdown.
>>
>> Please let me know if I'm missing something.
>>
>> Best Regards,
>> Hari
>>
>
>
> --
> Best regards,
>
> Shaofeng Shi 史少锋
>
>

Re: select column returns null values

Posted by ShaoFeng Shi <sh...@apache.org>.
Hi Hosur,

Firstly, please check Kylin's FAQ, search "Why I got an error when running
a “select * “ query?":
https://kylin.apache.org/docs/gettingstarted/faq.html

Maybe the "select price from " statement should also be pushed down, the
rule of pushdown can be optimized for it.

hosur narahari <hn...@gmail.com> 于2018年9月20日周四 上午11:15写道:

> Hi,
>
> I was trying out kylin with sample-cube example. And when I run "select *
> from kylin_sales" query, it returns all the values correctly. But when
> I run "select price from kylin_sales", it returns null in all rows.
> Price also was coming correctly in first scenario.
>
> One more thing is, first query is pushed down to hive and second one is
> fetched from cube. And yes, I've enabled pushdown.
>
> Please let me know if I'm missing something.
>
> Best Regards,
> Hari
>


-- 
Best regards,

Shaofeng Shi 史少锋