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] [Created] (PHOENIX-1290) Cannot alias a FIRST_VALUE column
Date Wed, 24 Sep 2014 16:56:33 GMT
Carter Shanklin created PHOENIX-1290:
----------------------------------------

             Summary: 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