Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-27489

HPL/SQL does not support table aliases on column names in loops

    XMLWordPrintableJSON

Details

    Description

      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:

       

      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
      

       

      This does not work in Hive -
      ERROR : Unhandled exception in HPL/SQL
      No other errors are shown

      Without alias, it works in Hive:

      BEGIN
      FOR rec IN (select a from test tab) LOOP
      dbms_output.put_line(rec.a);
      END LOOP;
      END;

      Attachments

        Issue Links

          Activity

            People

              Dayakar Dayakar M
              Dayakar Dayakar M
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: