> However reality is I just want it called 1 time which is during planning >and if I flag is as deterministic this is exactly what happens so you can >do this:
There was a new constant added in hive-1.2.0 named CURRENT_TIMESTAMP which works the way most people want unix_timestamp() to work. > AND article_meta.publish_timestamp > ((unix_timestamp() * 1000) - (1000 >* 60 * 60 * 24 * 2)) If if helps, I have a backport as a UDF on my github. https://github.com/t3rmin4t0r/current-timestamp/blob/master/src/main/java/o rg/notmysock/hive/udf/CurrentTimeStampUDF.java#L35 with that UDF, I expect it to constant fold (to_unix_timestamp(current_timestamp()) * 1000) into a single bigint. Cheers, Gopal