Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-12703

CLI agnostic HQL import command implementation

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0
    • None
    • Hive
    • SOURCE command added to Hive Query Language.
    • cli, source, hql

    Description

      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.

      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.

      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.

      References

      Attachments

        Activity

          People

            teabot Elliot West
            teabot Elliot West
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: