zeroflag opened a new pull request #2166:
URL: https://github.com/apache/hive/pull/2166


   HPLSQL supports stored function calls from HiveQL selects:
   
   For example:
   
   ```
   create function hello(s string) returns string;
   begin
     return 'hello ' || s;
   end;
   ```
   
   The above stored function can be used in a select:
   
   ```
   select hello(name) from employees;
   ```
   
   HPLSQL translates this to a UDF call.
   
   ```
   SELECT hplsql('hello(:1)', name) FROM users;
   ```
   
   The hplsql UDF is going to call the hplsql interpreter to evaluate the hello 
function. The earlier implementation used to look up the interpreter from the 
session state. But this only works if the evaluation happens in compile time 
and the UDF is running inside the HS2 process. This is not true for general 
therefore the UDF should instantiate a new interpreter and use that to eval the 
function call.


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to