hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Dere (JIRA)" <>
Subject [jira] [Created] (HIVE-18430) Add new determinism category for runtime constants (current_date, current_timestamp)
Date Wed, 10 Jan 2018 23:01:00 GMT
Jason Dere created HIVE-18430:

             Summary: Add new determinism category for runtime constants (current_date, current_timestamp)
                 Key: HIVE-18430
             Project: Hive
          Issue Type: Bug
          Components: UDF
            Reporter: Jason Dere
            Assignee: Jason Dere

Add a new piece of metadata to the UDFs to specify if whether a UDF is a runtime constant.
Runtime constants also exist in SQL Server, and this is similar to Postgres' concept of STABLE
functions. This metadata may be useful for materialized views and query caching.

Some Hive functions such as the ones listed below are currently labelled as deterministic,
but really are runtime constants:

The values for these functions are not deterministic between different queries - for example
current_timestamp will most likely be different every query executed. This makes these functions
ineligible for things like materialized views or cached query results.

However the value for the current_timestamp should not change during the life of a single
query, which allows these values to be used in optimizations such as constant folding.

This message was sent by Atlassian JIRA

View raw message