Hive
  1. Hive
  2. HIVE-4661

Unable to wrap analytical function in another function

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.11.0
    • Fix Version/s: None
    • Component/s: SQL
    • Labels:
      None

      Description

      I am unable to wrap an analytical function in another function as so:

      select
      case when ta_end_datetime_berekenen = 'Y'
      then lead(ta_update_datetime) over ( partition by dn_waarde_van, dn_waarde_tot order by ta_update_datetime )
      else ea_end_datetime end as ea_end_datetime
      , ta_insert_datetime
      , ta_update_datetime
      from tmp_wtdh_bestedingsklasse_10_s2_stap2

      This produces the following error:

      NoViableAltException(86@[129:7: ( ( ( KW_AS )? identifier ) | ( KW_AS LPAREN identifier ( COMMA identifier )* RPAREN ) )?])

      FAILED: ParseException line 1:175 missing KW_END at 'over' near ')' in selection target line 1:254 cannot recognize input near 'else' 'ea_end_datetime' 'end' in selection target

        Activity

        Hide
        Harish Butani added a comment -

        This is fixed with HIVE-4214. Can you retry with that patch.

        Show
        Harish Butani added a comment - This is fixed with HIVE-4214 . Can you retry with that patch.

          People

          • Assignee:
            Unassigned
            Reporter:
            Frans Drijver
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development