You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "John Sichi (JIRA)" <ji...@apache.org> on 2010/01/25 20:20:34 UTC

[jira] Commented: (HIVE-1096) Hive Variables

    [ https://issues.apache.org/jira/browse/HIVE-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804660#action_12804660 ] 

John Sichi commented on HIVE-1096:
----------------------------------

What will happen if a variable is referenced by CREATE VIEW?  If the substitution is done via simple string replacement, then the variable's value at time of CREATE VIEW will be statically bound.  If done downstream, we could instead make it dynamic, but this might require making variables first-class objects in the metastore (as globals, potentially with overrides at other scopes such as per-session or per-user).


> Hive Variables
> --------------
>
>                 Key: HIVE-1096
>                 URL: https://issues.apache.org/jira/browse/HIVE-1096
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>
> From mailing list:
> --Amazon Elastic MapReduce version of Hive seems to have a nice feature called "Variables." Basically you can define a variable via command-line while invoking hive with -d DT=2009-12-09 and then refer to the variable via ${DT} within the hive queries. This could be extremely useful. I can't seem to find this feature even on trunk. Is this feature currently anywhere in the roadmap?--
> This could be implemented in many places.
> A simple place to put this is 
> in Driver.compile or Driver.run we can do string substitutions at that level, and further downstream need not be effected. 
> There could be some benefits to doing this further downstream, parser,plan. but based on the simple needs we may not need to overthink this.
> I will get started on implementing in compile unless someone wants to discuss this more.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.