phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carter Shanklin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1290) Cannot alias a FIRST_VALUE column
Date Wed, 24 Sep 2014 17:13:34 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14146546#comment-14146546
] 

Carter Shanklin commented on PHOENIX-1290:
------------------------------------------

You're right, my mistake.

> Cannot alias a FIRST_VALUE column
> ---------------------------------
>
>                 Key: PHOENIX-1290
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1290
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 5.0.0
>            Reporter: Carter Shanklin
>
> So this works:
> {code}
> select
>         ss_customer_sk,
>         first_value(ss_sold_date_sk)
> within group
>         (order by ss_sold_date_sk asc)
> from
>         store_sales
> group by
>         ss_customer_sk;
> {code}
> And this doesn't:
> {code}
> select
>         ss_customer_sk,
>         first_value(ss_sold_date_sk) as f
> within group
>         (order by ss_sold_date_sk asc)
> from
>         store_sales
> group by
>         ss_customer_sk;
> {code}
> You get:
> {code}
> Error: ERROR 605 (42P00): Syntax error. Unknown function: "FIRST_VALUE". (state=42P00,code=605)
> {code}
> Same result if I drop the "as".
> This makes it difficult to use first_value in connection with the new subjoin feature.
FIRST_VALUE spits out a very strange column name (in this case it's null(SS_SOLD_DATE_SK,
true, SS_SOLD_DATE_SK)).
> Probably affects NTH_VALUE and LAST_VALUE as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message