hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Steinbach (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-1096) Hive Variables
Date Thu, 18 Feb 2010 02:21:28 GMT

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

Carl Steinbach commented on HIVE-1096:

* Test cases?
* Using the HiveConf namespace for user variables seems like a bad idea, especially since
there are no checks in place to prevent people from defining variables with names like "hive.foo.bar"
Giving users unprotected access to your configuration namespace usually leads to problems
down the road.
* It would be nice to be able to reference Java system properties using this syntax.
* It would be nice to be able to nest variable definitions, e.g. version="0.6.0", jar_name="hive-exec-${version}".
The variable interpolation code in Hadoop's Configuration class does this.
* It would be nice to be able to prevent interpolation using an escape character, e.g. "\${somevar}".
* Driver.replace(String) should have a name like Driver.interpolateCommandVariables(), or
* Driver.replace() iterates over the list of defined variables. Instead, I think it should
iterate over the tokens in the command that match the pattern '${.*}'. This would make it
easy to log any cases where the command contains "${foo.bar}" and foo.bar is undefined.
* Replace the reference to the string literal "hive.variable.replace" with HIVEVARREPLACE.

> 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
>         Attachments: 1096-9.diff, hive-1096-2.diff, hive-1096-7.diff, hive-1096-8.diff,
> 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.

View raw message