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

Bug while executing control structure with subquery

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            Pixma Dennis

            Dates

              Created:
              Updated:

              Slack

                Issue deployment