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

allow column names to be prefixed by table alias in select all queries

    XMLWordPrintableJSON

Details

    Description

      When using "CREATE TABLE x AS SELECT ..." where the select joins tables with hundreds of columns it is not a simple task to resolve duplicate column name exceptions (particularly with self-joins). The user must either manually specify aliases for all duplicate columns (potentially hundreds) or write a script to generate the data set in a separate select query, then create the table and load the data in.

      There should be some conf flag that would allow queries like

      "create table joined as select one.*, two.* from mytable one join mytable two on (one.duplicate_field = two.duplicate_field1);"

      to create a table with columns one_duplicate_field and two_duplicate_field.

      Attachments

        1. HIVE-3236.1.patch.txt
          8 kB
          Keegan Mosley

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kmosley Keegan Mosley
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m