You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@impala.apache.org by Darren Hoo <da...@gmail.com> on 2019/05/18 16:14:27 UTC
ndv with having not work in cdh6
This Query works in CDH5 but fails in CDH6:
select
contentid,
parse_url(refer, 'HOST') as domain,
ndv(uuid) uv
from domain_logs and keywords is null group by contentid, domain
having uv > 3;
ERROR: AnalysisException: Could not resolve column/field reference: 'uv'
Impala Version: Server version: impalad version 3.2.0-cdh6.2.0 RELEASE
(build edc19942b4debdbfd485fbd26098eef435003f5d)
How to write this SQL in impala 3.2?
Re: ndv with having not work in cdh6
Posted by Tim Armstrong <ta...@cloudera.com>.
IMPALA-5191 is not a bug, it was a change in behaviour to make Impala more
standard conforming. The SQL standard doesn't allow references to select
list aliases within HAVING expressions and the old Impala behaviour
prevented a bunch of valid SQL queries from running. It's expected although
unfortunate that some non-standard queries like yours that previously
worked now no longer work after the change.
On Mon, May 20, 2019 at 7:27 PM Darren Hoo <da...@gmail.com> wrote:
> https://issues.apache.org/jira/browse/IMPALA-5191 says it is fixed in
> impala-3.0
>
> while in CDH6 , the version of impala we are using is v3.2.0-cdh6.2.0
>
> is it a regression?
>
> On Sun, May 19, 2019 at 2:00 AM Greg Rahn <gr...@gmail.com> wrote:
>
>> This is due to
>> https://issues.apache.org/jira/browse/IMPALA-5191
>>
>>
>> On Sat, May 18, 2019 at 9:32 AM Darren Hoo <da...@gmail.com> wrote:
>>
>>> reply to myself:
>>>
>>> juse use ndv(uuid), not using alias
>>>
>>>
>>> select
>>>
>>> contentid,
>>>
>>> parse_url(refer, 'HOST') as domain,
>>>
>>> ndv(uuid) as uv
>>>
>>> from domain_logs and keywords is null group by contentid,
>>> domain having ndv(uuid) > 3;
>>>
>>> On Sun, May 19, 2019 at 12:14 AM Darren Hoo <da...@gmail.com>
>>> wrote:
>>>
>>>> This Query works in CDH5 but fails in CDH6:
>>>>
>>>> select
>>>>
>>>> contentid,
>>>>
>>>> parse_url(refer, 'HOST') as domain,
>>>>
>>>> ndv(uuid) uv
>>>>
>>>> from domain_logs and keywords is null group by contentid,
>>>> domain having uv > 3;
>>>>
>>>>
>>>> ERROR: AnalysisException: Could not resolve column/field reference: 'uv'
>>>>
>>>>
>>>>
>>>> Impala Version: Server version: impalad version 3.2.0-cdh6.2.0 RELEASE
>>>> (build edc19942b4debdbfd485fbd26098eef435003f5d)
>>>>
>>>>
>>>>
>>>> How to write this SQL in impala 3.2?
>>>>
>>>
Re: ndv with having not work in cdh6
Posted by Darren Hoo <da...@gmail.com>.
https://issues.apache.org/jira/browse/IMPALA-5191 says it is fixed in
impala-3.0
while in CDH6 , the version of impala we are using is v3.2.0-cdh6.2.0
is it a regression?
On Sun, May 19, 2019 at 2:00 AM Greg Rahn <gr...@gmail.com> wrote:
> This is due to
> https://issues.apache.org/jira/browse/IMPALA-5191
>
>
> On Sat, May 18, 2019 at 9:32 AM Darren Hoo <da...@gmail.com> wrote:
>
>> reply to myself:
>>
>> juse use ndv(uuid), not using alias
>>
>>
>> select
>>
>> contentid,
>>
>> parse_url(refer, 'HOST') as domain,
>>
>> ndv(uuid) as uv
>>
>> from domain_logs and keywords is null group by contentid,
>> domain having ndv(uuid) > 3;
>>
>> On Sun, May 19, 2019 at 12:14 AM Darren Hoo <da...@gmail.com> wrote:
>>
>>> This Query works in CDH5 but fails in CDH6:
>>>
>>> select
>>>
>>> contentid,
>>>
>>> parse_url(refer, 'HOST') as domain,
>>>
>>> ndv(uuid) uv
>>>
>>> from domain_logs and keywords is null group by contentid,
>>> domain having uv > 3;
>>>
>>>
>>> ERROR: AnalysisException: Could not resolve column/field reference: 'uv'
>>>
>>>
>>>
>>> Impala Version: Server version: impalad version 3.2.0-cdh6.2.0 RELEASE
>>> (build edc19942b4debdbfd485fbd26098eef435003f5d)
>>>
>>>
>>>
>>> How to write this SQL in impala 3.2?
>>>
>>
Re: ndv with having not work in cdh6
Posted by Greg Rahn <gr...@gmail.com>.
This is due to
https://issues.apache.org/jira/browse/IMPALA-5191
On Sat, May 18, 2019 at 9:32 AM Darren Hoo <da...@gmail.com> wrote:
> reply to myself:
>
> juse use ndv(uuid), not using alias
>
>
> select
>
> contentid,
>
> parse_url(refer, 'HOST') as domain,
>
> ndv(uuid) as uv
>
> from domain_logs and keywords is null group by contentid,
> domain having ndv(uuid) > 3;
>
> On Sun, May 19, 2019 at 12:14 AM Darren Hoo <da...@gmail.com> wrote:
>
>> This Query works in CDH5 but fails in CDH6:
>>
>> select
>>
>> contentid,
>>
>> parse_url(refer, 'HOST') as domain,
>>
>> ndv(uuid) uv
>>
>> from domain_logs and keywords is null group by contentid,
>> domain having uv > 3;
>>
>>
>> ERROR: AnalysisException: Could not resolve column/field reference: 'uv'
>>
>>
>>
>> Impala Version: Server version: impalad version 3.2.0-cdh6.2.0 RELEASE
>> (build edc19942b4debdbfd485fbd26098eef435003f5d)
>>
>>
>>
>> How to write this SQL in impala 3.2?
>>
>
Re: ndv with having not work in cdh6
Posted by Darren Hoo <da...@gmail.com>.
reply to myself:
juse use ndv(uuid), not using alias
select
contentid,
parse_url(refer, 'HOST') as domain,
ndv(uuid) as uv
from domain_logs and keywords is null group by contentid, domain
having ndv(uuid) > 3;
On Sun, May 19, 2019 at 12:14 AM Darren Hoo <da...@gmail.com> wrote:
> This Query works in CDH5 but fails in CDH6:
>
> select
>
> contentid,
>
> parse_url(refer, 'HOST') as domain,
>
> ndv(uuid) uv
>
> from domain_logs and keywords is null group by contentid,
> domain having uv > 3;
>
>
> ERROR: AnalysisException: Could not resolve column/field reference: 'uv'
>
>
>
> Impala Version: Server version: impalad version 3.2.0-cdh6.2.0 RELEASE
> (build edc19942b4debdbfd485fbd26098eef435003f5d)
>
>
>
> How to write this SQL in impala 3.2?
>