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

Column aliases

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • Query Processor
    • None

    Description

      It would be nice in several cases to be able to alias column names.

      Say someone in your company CREATEd a TABLE called important_but_named_poorly (alvin BIGINT, theodore BIGINT, simon STRING) PARTITIONED BY (dave STRING), that indexes the relationship between an actor (alvin), a target (theodore), and the interaction between them (simon), partitioned based on the date string (dave). Renaming the columns would break a million pipelines that are important but ownerless.

      It would be awesome to define an aliasing system as such:

      ALTER TABLE important_but_named_poorly REPLACE COLUMNS (actor BIGINT AKA alvin, target BIGINT AKA theodore, ixn STRING AKA simon) PARTITIONED BY (ds STRING AKA dave);

      ...which would mean that any user could, e.g., use the term "dave" to refer to ds if they really wanted to.

      Attachments

        Activity

          People

            Unassigned Unassigned
            akramer Adam Kramer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: