You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Zoltan Haindrich (Jira)" <ji...@apache.org> on 2021/06/23 11:37:00 UTC

[jira] [Created] (HIVE-25278) HiveProjectJoinTransposeRule may do invalid transformations with windowing expressions

Zoltan Haindrich created HIVE-25278:
---------------------------------------

             Summary: HiveProjectJoinTransposeRule may do invalid transformations with windowing expressions 
                 Key: HIVE-25278
                 URL: https://issues.apache.org/jira/browse/HIVE-25278
             Project: Hive
          Issue Type: Bug
            Reporter: Zoltan Haindrich
            Assignee: Zoltan Haindrich


running
{code}
create table table1 (acct_num string, interest_rate decimal(10,7)) stored as orc;
create table table2 (act_id string) stored as orc;
CREATE TABLE temp_output AS
SELECT act_nbr, row_num
FROM (SELECT t2.act_id as act_nbr,
row_number() over (PARTITION BY trim(acct_num) ORDER BY interest_rate DESC) AS row_num
FROM table1 t1
INNER JOIN table2 t2
ON trim(acct_num) = t2.act_id) t
WHERE t.row_num = 1;
{code}

may result in error like:

{code}
Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Invalid column reference 'interest_rate': (possible column names are: interest_rate, trim) (state=42000,code=40000)
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)