hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Meed <>
Subject Using the map data type
Date Tue, 01 Nov 2011 16:56:30 GMT
Hi Hive Experts.

I think I may have found a bug in hive and was wondering if there is a
better workaround then the one I am using.  When I run the script below all
the values for the map are null, I.E.  beacon.QS['cid'] is null.

(from beacons
   select TRANSFORM(ipaddress, ipaddress2, identd, user, finishtime,
requestline, returncode, size, referer, userAgent ) using
   as (ipaddress STRING, ipaddress2 STRING, identd STRING, user
STRING,finishtime STRING, QS MAP<STRING, STRING>, returncode INT, size INT,
referer STRING, userAgent STRING)
   where dt="2011-10-29"
) beacon
insert overwrite table beacon_processed PARTITION(dt="2011-10-25", hour=1,
minute=1, type="click")
SELECT beacon.ipaddress, beacon.user, beacon.QS['cid'], beacon.QS['pid'],
beacon.QS['PlacementId'], beacon.QS, returncode, size;
select * from beacon_processed limit 200;

On the other hand if I just do a select on the map data type I get the
values from the map.
SELECT ipaddress, user_agent, querystring['cid'], querystring['pid'],
querystring['PlacementId'], returncode, size FROM beacon_processed  limit

Is this a bug or am I doing something wrong

Jonathan Meed
University of Michigan
School of Engineering Class of 2013

View raw message