HPL/SQL is included to Apache Hive since version 2.0
ASSOCIATE LOCATOR statement allows you to associate locator variable with a result set returned from a stored procedure.
Then you can use ALLOCATE CURSOR statement to assign a cursor for the locator and fetch data.
ASSOCIATE [RESULT SET] LOCATOR | LOCATORS (loc [, locN, ...]) WITH PROCEDURE procedure_name
For examples, see ALLOCATE CURSOR statement.
Compatibility: IBM DB2
Version: HPL/SQL 0.3.11