hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramkumar <ramkumar.sugava...@yahoo.com>
Subject nested UDFs on Partition column
Date Thu, 19 Apr 2012 09:57:03 GMT
Hi,

I have a table partitioned by local_date.  When I write a query with

WHERE local_date = =date_add('2011-12-07',3) ,

hive executes the UDF ahead and looks only into the specific partitions.   But when the
udf becomes more complex like

WHERE local_date = date_sub(to_date(from_unixtime(unix_timestamp())),3),

hive looks through all the partitions even though the above function  can very well be computed
ahead of time and optimize the query.  Is this behaviour intentional ? And is there a workaround
other than hardcoding the date or using a param?

Thanks,
Ramkumar

Mime
View raw message