You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Kumar Saurabh <ku...@gmail.com> on 2010/07/19 05:16:18 UTC

Re: Query struct

I am not a hive expert, but in the result for the following query --

select crawler.domain from spect;

you dont get any rows that end with 1.

is it simply a case that your data does not match the query?

kumar

On Sun, Jul 18, 2010 at 8:11 PM, Sagar Naik <sn...@attributor.com> wrote:
> hive> describe spect;
> describe spect;
> OK
> url string
> key string
> crawler
> struct<domain:string,component:string,http_headers:string,machine:string,proxy:string,crawl_time:bigint>
> dust struct<in_the_system:boolean,urls:array<string>>
> Time taken: 0.046 seconds
> hive>select crawler.domain from spect;
> OK
>  domain
>  domain2
>  domain3
>  domain4
>  domain5
>  domain
>  domain2
>  domain3
>  domain4
>  domain5
>  domain_failed
> Time taken: 17.183 seconds
> HOWEVER, now when I try to fire the query where crawler.domain , I get blank
> answer , no records.
> hive>select crawler.domain , dust.in_the_system from spect where
> crawler.domain like '%1';
> OK
> Time taken: 5.442 seconds
> hive>select crawler.domain , dust.in_the_system from specttacles where
> crawler.domain ='domain1';
> OK
> Time taken: 5.457 seconds
> hive>
>
> pl help. How can I query fields in struct ?
> OR wht I am doing wrong here
> -Sagar