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

RESIGNAL:actual results are inconsistent with expectations at hplsql

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.2.0, 3.0.0
    • None
    • hpl/sql
    • None

    Description

      when I execute example 3 at http://www.hplsql.org/resignal:

      BEGIN
      DECLARE EXIT HANDLER FOR SQLEXCEPTION
      BEGIN
      GET DIAGNOSTICS EXCEPTION 1 text = MESSAGE_TEXT;
      PRINT 'SQLSTATE: ' || SQLSTATE;
      PRINT 'Text: ' || text;
      END;

      BEGIN
      DECLARE EXIT HANDLER FOR SQLEXCEPTION
      RESIGNAL SQLSTATE '02031' SET MESSAGE_TEXT = 'Some error';

      SELECT * FROM abc.abc; – Table does not exist, raise an exception
      END;
      END;

      Actual results:
      SQLSTATE: 42S02
      Text: Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:14 Table not found 'abc'

      The official result is:
      SQLSTATE: 02031
      Text: Some error

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: