hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhishek Gayakwad <a.gayak...@gmail.com>
Subject Re: Wrapping an analytical function
Date Mon, 23 Sep 2013 11:49:55 GMT
Hi Frans,

I am also getting same error while using analytical functions with case
expression

FAILED: ParseException line 3:19 missing KW_END at 'over' near '<EOF>'

it is not allowing to use arithmetic operators with analytical function as
well

NoViableAltException(273@[129:7: ( ( ( KW_AS )? identifier ) | ( KW_AS
LPAREN identifier ( COMMA identifier )* RPAREN ) )?])
FAILED: ParseException line 3:120 cannot recognize input near '+' 'lag' '('
in selection target

were you able to fine any fix or workaround for this problem?
Thanks
Abhishek


On Mon, May 27, 2013 at 9:12 PM, Frans Drijver <frans.drijver@inergy.nl>wrote:

> Hi there,
>
>
> I am trying the following:
>
> 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 ea_end_datetime,
> ta_insert_datetime, ta_update_datetime from
> tmp_wtdh_bestedingsklasse_10_s2_stap2
>
> However, when I try that, I get 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
>
> Would I be correct in assuming that it's not possible to wrap an
> analytical function in another function?
>
> This is with Hive 0.11.
>
> Any feedback is appreciated!
>
>
> Kind regards,
>
>
> Frans Drijver

Mime
View raw message