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

CREATE VIEW should expand the query text consistently

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6.0
    • 0.6.0
    • None
    • None
    • Reviewed

    Description

      We should expand the omitted alias in the same way in "select" and in "group by".

      Hive "Group By" recognize "group by" expressions by comparing the literal string.

      hive> create view zshao_view as select d, count(1) as cnt from zshao_tt group by d;
      OK
      Time taken: 0.286 seconds
      hive> select * from zshao_view;
      FAILED: Error in semantic analysis: line 1:7 Expression Not In Group By Key d in definition of VIEW zshao_view [
      select d, count(1) as `cnt` from `zshao_tt` group by `zshao_tt`.`d`
      ] used as zshao_view at line 1:14
      

      Attachments

        1. HIVE-1124.1.patch
          76 kB
          John Sichi
        2. HIVE-1124.2.patch
          77 kB
          John Sichi
        3. HIVE-1124.3.patch
          77 kB
          John Sichi

        Issue Links

          Activity

            People

              jvs John Sichi
              zshao Zheng Shao
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: