[ https://issues.apache.org/jira/browse/HIVE-28215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krisztian Kasa resolved HIVE-28215. ----------------------------------- Fix Version/s: 4.1.0 Resolution: Fixed Merged to master. Thanks [~Dayakar] for the patch. > 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 > Priority: Major > Labels: pull-request-available > Fix For: 4.1.0 > > > Signalling CONDITION HANDLER is not working in HPLSQL. > Refer [http://www.hplsql.org/declare-condition] and > [http://www.hplsql.org/declare-handler] for more details about this feature. > > +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} > > Here when _SIGNAL wrong_cnt_condition;_ statement is executed, it has to > invoke corresponding continue/exit handlers and should execute the statements > present in the handler block. But currently its not happening. -- This message was sent by Atlassian Jira (v8.20.10#820010)