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

Support CTE with column labels

    XMLWordPrintableJSON

Details

    Description

      with cte1(a, b) as (select int_col x, bigint_col y from t1)
      select a, b from cte1
      a	b
      1	2
      3	4
      
      <query expression> ::=
        [ <with clause> ] <query expression body>
        [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
      
      <with clause> ::=
        WITH [ RECURSIVE ] <with list>
      
      <with list> ::=
        <with list element> [ { <comma> <with list element> }... ]
      
      <with list element> ::=
        <query name> [ <left paren> <with column list> <right paren> ]
        AS <table subquery> [ <search or cycle clause> ]
      
      <with column list> ::=
        <column name list>
      

      Attachments

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              kkasa Krisztian Kasa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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