Dayakar M created HIVE-28215:
--------------------------------

             Summary: Signalling CONDITION HANDLER is not working in HPLSQL.
                 Key: HIVE-28215
                 URL: https://issues.apache.org/jira/browse/HIVE-28215
             Project: Hive
          Issue Type: Bug
          Components: hpl/sql
            Reporter: Dayakar M
            Assignee: Dayakar M


Signalling CONDITION HANDLER is not working in HPLSQL.

Steps to Reproduce:
{noformat}
jdbc:hive2://ccycloud-1.nightly-71x-oq.roo> DECLARE cnt INT DEFAULT 0; 
. . . . . . . . . . . . . . . . . . . . . . .> DECLARE wrong_cnt_condition 
CONDITION;
. . . . . . . . . . . . . . . . . . . . . . .> 
. . . . . . . . . . . . . . . . . . . . . . .> DECLARE EXIT HANDLER FOR 
wrong_cnt_condition
. . . . . . . . . . . . . . . . . . . . . . .>   PRINT 'Wrong number of rows'; 
. . . . . . . . . . . . . . . . . . . . . . .> 
. . . . . . . . . . . . . . . . . . . . . . .> EXECUTE IMMEDIATE 'SELECT 
COUNT(*) FROM sys.tbls' INTO cnt;
. . . . . . . . . . . . . . . . . . . . . . .> 
. . . . . . . . . . . . . . . . . . . . . . .> IF cnt <> 0 THEN
. . . . . . . . . . . . . . . . . . . . . . .>   SIGNAL wrong_cnt_condition;
. . . . . . . . . . . . . . . . . . . . . . .> END IF;
. . . . . . . . . . . . . . . . . . . . . . .> /
INFO  : Compiling 
command(queryId=hive_20240424171747_7f22fef6-70d5-483a-af67-7a6b9f17ac8b): 
SELECT COUNT(*) FROM sys.tbls
INFO  : Semantic Analysis Completed (retrial = false)
INFO  : Created Hive schema: Schema(fieldSchemas:[FieldSchema(name:_c0, 
type:bigint, comment:null)], properties:null)
INFO  : Completed compiling 
command(queryId=hive_20240424171747_7f22fef6-70d5-483a-af67-7a6b9f17ac8b); Time 
taken: 0.995 seconds 

INFO  : Completed executing 
command(queryId=hive_20240424171747_7f22fef6-70d5-483a-af67-7a6b9f17ac8b); Time 
taken: 8.479 seconds
INFO  : OK
ERROR : wrong_cnt_condition
No rows affected (9.559 seconds)
0: jdbc:hive2://localhost>{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to