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

invalid column reference error on grouping by constant

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • 1.3.0, 2.1.0
    • None
    • None

    Description

      CREATE TABLE some_table (c INT);
      WITH t1 AS (
      SELECT
      0 AS a,
      0 AS b
      FROM
      some_table
      )
      SELECT
        a,
        b,
        count(1) AS cnt
      FROM
        t1
      GROUP BY
        a,
        b
      

      returns
      Error: Error while compiling statement: FAILED: SemanticException [Error 10002]: Line 16:2 Invalid column reference 'b' (state=42000,code=10002)

      Attachments

        Issue Links

          Activity

            People

              ychena Yongzhi Chen
              cvaliente Clemens Valiente
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: