Dayakar M created HIVE-27489:
--------------------------------
Summary: 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
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 BDH_HIVE_OWNER.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)