You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Andy Kent <An...@forward.co.uk> on 2010/03/09 14:06:42 UTC

parse_url 0.5.0 Regression?

We have a query like...

SELECT parse_url(url, 'QUERY:q') as query FROM table

I'm sure this used to work in hive 0.4.1 and the docs suggest that 'QUERY:key' should extract the relevant key from a query string but it always seems to return NULL in 0.5.0 is this a regression? or maybe the parse_url() API has changed?

Thanks,
Andy

Re: parse_url 0.5.0 Regression?

Posted by Andy Kent <An...@forward.co.uk>.
On 9 Mar 2010, at 15:36, 김영우 wrote:

> SELECT parse_url(url, 'QUERY', 'q') as query FROM table

Thanks, this works so I assume it's the wiki that is incorrect...

http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF#String_Functions

I don't seem to be able to edit the page so should I file a Jira issue for this?

Re: parse_url 0.5.0 Regression?

Posted by 김영우 <wa...@gmail.com>.
Hi Andy,

SELECT parse_url(url, 'QUERY', 'q') as query FROM table

You can specify a query key. I did not test it in vanilla Hive 4.x but it
works in Cloudera's Hive RPM(0.4.1)

Youngwoo

2010/3/9 Andy Kent <An...@forward.co.uk>

> We have a query like...
>
> SELECT parse_url(url, 'QUERY:q') as query FROM table
>
> I'm sure this used to work in hive 0.4.1 and the docs suggest that
> 'QUERY:key' should extract the relevant key from a query string but it
> always seems to return NULL in 0.5.0 is this a regression? or maybe the
> parse_url() API has changed?
>
> Thanks,
> Andy