Thank you Chuck.It worked for me.Would also share a sample function which joins two tables and returns a value ?
[We are able to return a value when using single table in the function .When doing a join between two tables and returning a value it is failing like the above syntax]
Hi @bpreachuk /All , We were able to find the issue.Changing the return type to record will work.Special thanks to Chuk.
CREATE FUNCTION my_functionn() RETURNS RECORD BEGIN DROP TABLE default.dg_join3 ; CREATE TABLE default.dg_join3(name string, phone string) ; INSERT INTO TABLE default.dg_join3 SELECT a.name, b.phone from default.dg_1 a,default.dg_2 b where a.id = b.id ;SELECT * FROM default.dg_join3 ; END; PRINT my_functionn();
I am facing some issues in HPLSQL.I am using Hive 1.2 version Can you please help me out.
1. TRIM in plsql supports trimming of a pattern from a string.. but TRIM in hplsql removes only spaces but doesnt support removing a pattern.
2. UDFs created on hive on cannot be used in a hplsql script as its antl4 parser doesnt have it in its lexicon