Hive
  1. Hive
  2. HIVE-3107

Improve semantic analyzer to better handle column name references in group by/sort by clauses

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0, 0.10.0, 0.11.0, 0.12.0
    • Fix Version/s: 0.13.0
    • Component/s: Query Processor
    • Labels:
      None

      Description

      This is related to HIVE-1922.

      Following queries all fail with various SemanticExceptions:

      explain select t.c from t group by c;
      explain select t.c from t group by c sort by t.c; 
      explain select t.c as c0 from t group by c0;
      explain select t.c from t group by t.c sort by t.c; 
      

      It is true that one could always find a version of any of above queries that works. But one has to try to find out and it doesn't work well with machine generated SQL queries.

      1. HIVE-3107.6.patch
        51 kB
        Harish Butani
      2. HIVE-3107.5.patch
        48 kB
        Harish Butani
      3. HIVE-3107.4.patch
        47 kB
        Harish Butani
      4. HIVE-3107.3.patch
        46 kB
        Harish Butani
      5. HIVE-3107.2.patch
        36 kB
        Harish Butani
      6. HIVE-3107.1.patch
        30 kB
        Harish Butani

        Issue Links

          Activity

            People

            • Assignee:
              Harish Butani
              Reporter:
              Richard Ding
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development