You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Elliot West (JIRA)" <ji...@apache.org> on 2015/12/17 15:36:47 UTC
[jira] [Created] (HIVE-12703) CLI agnostic HQL import command
implementation
Elliot West created HIVE-12703:
----------------------------------
Summary: CLI agnostic HQL import command implementation
Key: HIVE-12703
URL: https://issues.apache.org/jira/browse/HIVE-12703
Project: Hive
Issue Type: New Feature
Components: Hive
Affects Versions: 2.0.0
Reporter: Elliot West
Assignee: Elliot West
_As an HQL developer_
_I'd like a single command to import HQL script files, that works across all Hive CLIs and shells_
_So that I can compose larger scripts from smaller components irrespective of my Hive execution environment._
h3. Motivation
Current Hive CLIs include commands that allow the user to effectively import and execute HQL scripts from a file. The {{hive}} CLI provides the {{SOURCE}} command and {{beeline}} provides the {{!run}} command. This allows HQL developers to decompose complex HQL processes into multiple HQL scripts files. These can be individually executed or tested, and in the case of {{MACROs}}, imported in a manner similar to a functionary library. These 'source' commands allow HQL developers to compose these smaller modules purely in the domain of Hive (i.e. no external shell such as {{bash}} is needed).
However, this seems to be a feature of the individual CLIs and not part of the core HQL language. Consequently this can lead to the development of Hive processes that are not portable across different execution contexts, even for the same version of Hive.
h3. Proposal
The ability to compose and encapsulate logic is a fundamental building block of any scalable language and therefore I believe that this functionality should be available in the core HQL language and not just implemented in the CLIs. I propose that the {{SOURCE}} command be a first class citizen of the HQL language and is available consistently in all execution contexts.
h3. References
* [{{SOURCE}} implementation in the {{hive}} CLI.|https://github.com/apache/hive/blob/0ae374a320d1cae523ba2b434800e97692507db8/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java#L137]
* [{{SOURCE}} documentation.|https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Cli#LanguageManualCli-HiveInteractiveShellCommands]
* [{{!run}} implementation in {{beeline}}.|https://github.com/apache/hive/blob/master/beeline/src/java/org/apache/hive/beeline/Commands.java#L1535]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)