You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ZhangBing Lin (JIRA)" <ji...@apache.org> on 2017/09/28 02:10:00 UTC

[jira] [Updated] (HIVE-17630) RESIGNAL:actual results are inconsistent with expectations at hplsql

     [ https://issues.apache.org/jira/browse/HIVE-17630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ZhangBing Lin updated HIVE-17630:
---------------------------------
    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;

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

> RESIGNAL:actual results are inconsistent with expectations at hplsql
> --------------------------------------------------------------------
>
>                 Key: HIVE-17630
>                 URL: https://issues.apache.org/jira/browse/HIVE-17630
>             Project: Hive
>          Issue Type: Bug
>          Components: hpl/sql
>            Reporter: ZhangBing Lin
>            Priority: Minor
>
> 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;
> result:
> SQLSTATE: 42S02
> Text: Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:14 Table not found 'abc'



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)