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

HPL/SQL function variable block is not initialized

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 3.0.0
    • hpl/sql
    • None

    Description

      Variable inside declaration block are not initialized:

      CREATE FUNCTION test1()
        RETURNS STRING
      AS
        ret string DEFAULT 'Initial value';
      BEGIN
        print(ret);
        ret := 'VALUE IS SET';
        print(ret);
      END;
      
      test1();
      

      Output:

      ret      
      VALUE IS SET
      

      Should be:

      Initial value     
      VALUE IS SET
      

      Attachments

        1. HIVE-17452.1.patch
          4 kB
          Dmitry Tolpeko

        Activity

          People

            dmtolpeko Dmitry Tolpeko
            dmtolpeko Dmitry Tolpeko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: