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

Bug while executing control structure with subquery

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      I found a bug in HPL/SQL 0.3.31 integrated in Hive Service.
      When I execute following Stored Procedure, the Print inside the IF Statement is not reached:
       
      CREATE PROCEDURE EVALUATION
      BEGIN 
      DECLARE Result DOUBLE;
      SELECT Result = MAX(LISTPRICE) FROM PRODUCT_ORC;
      PRINT Result;
          IF CAST(Result AS DOUBLE) > 500.00 THEN
           PRINT 'IF wird aufgerufen';
          END IF;
      END
       
      You can reproduce the bug, when you run following SQL Statements in hive, before you start the HPL/SQL stored procedure
      CREATE TABLE adventureworks.PRODUCT_ORC
      (
        productid int,
        listprice double
      )
      ROW FORMAT DELIMITED
      FIELDS TERMINATED BY ','
      STORED AS ORC
      TBLPROPERTIES("transactional"="true");

      INSERT INTO PRODUCT_ORC VALUES (1, 250.358);
      INSERT INTO PRODUCT_ORC VALUES (2, 358.485);
      INSERT INTO PRODUCT_ORC VALUES (3, 501.525);
       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Pixma Dennis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: