Specified functions in the partitioning predicates should not generate a M/R 
job.
---------------------------------------------------------------------------------

                 Key: HIVE-2124
                 URL: https://issues.apache.org/jira/browse/HIVE-2124
             Project: Hive
          Issue Type: Improvement
          Components: Query Processor
    Affects Versions: 0.7.0, 0.6.0, 0.5.0
            Reporter: Esteban Gutierrez
            Priority: Minor


For certain situations specifying which functions should be evaluated once 
would help to make syntax simpler to avoid launching M/R jobs.

Example:

# myhql.time=`date "+%s"` -> constant
# counting rows from the last 30 days generates a M/R job using all the 
partitions
$ hive -hiveconf myhql.time=`date "+%s"` -e "SELECT COUNT(*) FROM mybigtable 
WHERE mypartition >= 
from_unixtime(\${hiveconf:myhql.time}-2592000,'yyyy-MM-dd');

Suggested feature:

# will scan only the right partitions
$ hive -hiveconf hive.partition.evaluateonce=unix_timestamp -e "SELECT COUNT(*) 
FROM mybigtable WHERE mypartition >= 
from_unixtime(unix_timestamp()-2592000,'yyyy-MM-dd');



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to