[ https://issues.apache.org/jira/browse/HIVE-27489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krisztian Kasa resolved HIVE-27489. ----------------------------------- Fix Version/s: 4.1.0 Resolution: Fixed Merged to master. Thanks [~Dayakar] for the patch and [~aturoczy] for review. > HPL/SQL does not support table aliases on column names in loops > --------------------------------------------------------------- > > Key: HIVE-27489 > URL: https://issues.apache.org/jira/browse/HIVE-27489 > Project: Hive > Issue Type: Bug > Components: hpl/sql > Reporter: Dayakar M > Assignee: Dayakar M > Priority: Major > Labels: pull-request-available > Fix For: 4.1.0 > > > HPL/SQL does not support table aliases on column names in cursor loops where > as the same works in Oracle's PL/SQL. > > This works in Oracle: > > {noformat} > CREATE OR replace PROCEDURE test2 > AS > BEGIN > FOR rec IN (select tab.a from test tab) LOOP > dbms_output.put_line(rec.a); > END LOOP; > END; > SQL> call test2(); > one > two > {noformat} > > This does not work in Hive - > ERROR : Unhandled exception in HPL/SQL > No other errors are shown > Without alias, it works in Hive: > {noformat} > BEGIN > FOR rec IN (select a from test tab) LOOP > dbms_output.put_line(rec.a); > END LOOP; > END;{noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)