mdayakar commented on PR #6422: URL: https://github.com/apache/hive/pull/6422#issuecomment-4305794846
Thanks for the detailed review @thomasrebele `Stmt#fetch when entering the if (ctx.bulk_collect_clause() != null), no status is set` -- Fixed, setting Sql SUCCESS status. `Stmt#return_ calls Exec#signal(Signal.Type), which always setSqlCode(SqlCodes.ERROR)` -- Fixed, now calling Exec#signal(Signal.Type, null, null) which will set only signal state. `Stmt#allocateCursor does not set the status` -- Fixed, setting Sql SUCCESS status. `There are a few setSqlCode(SqlCodes.NO_DATA_FOUND), even though there's a dedicated method Exec#setSqlNoData; moreover, 2 out of 3 of these calls are directly followed by a exec.signal(Signal.Type.NOTFOUND), which overrides the SQL code to SqlCodes.ERROR` -- Fixed, now calling Exec#setSqlNoData; in all places where setSqlCode(SqlCodes.NO_DATA_FOUND) API is called. Some places seem to not set the SQL state: `Stmt#use uses exec.setSqlCode(SqlCodes.SUCCESS) instead of exec.setSqlSuccess()` -- Fixed, Changed exec.setSqlCode(SqlCodes.SUCCESS) to exec.setSqlSuccess(). `Expression#execCursorAttribute, if (cursorVar != null)` -- Here cursor attribute is set based on %ISOPEN, %FOUND and %NOTFOUND, the return value will be either true/false/null so no need of setting ERRORCODE here. `Exec#execHost` -- Here already HOSTCODE is getting set. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
