[ 
https://issues.apache.org/jira/browse/HIVE-11055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14641534#comment-14641534
 ] 

wangchangchun commented on HIVE-11055:
--------------------------------------

Hello, I try to use HPL/SQL function. AND most of this function is OK.
I put some problem I found here, you can solve it later.

First:
CREATE TABLE aaaa (a int, b int);
create or replace testinsertinto()
BEGIN
INSERT INTO aaaa values (50,10);
END;
CALL testinsertinto();

Second:

create or replace procedure  testinto()
BEGIN
declare
        v_dtlTime                      DECIMAL(18,0);
        select top 1 starttime into v_dtlTime from TDR_PCC_SUBQUOTA_17000;
        PRINT v_dtlTime;
END;
CALL testinto();

Third:
create procedure testwf()
begin
  SELECT
  dept,
  userid,
  sal,
  CUME_DIST() OVER(ORDER BY sal) AS rn1,
  CUME_DIST() OVER(PARTITION BY dept ORDER BY sal) AS rn2
  FROM lxw1234;

end;
call testwf();







> HPL/SQL - Implementing Procedural SQL in Hive (PL/HQL Contribution)
> -------------------------------------------------------------------
>
>                 Key: HIVE-11055
>                 URL: https://issues.apache.org/jira/browse/HIVE-11055
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Dmitry Tolpeko
>            Assignee: Dmitry Tolpeko
>             Fix For: 2.0.0
>
>         Attachments: HIVE-11055.1.patch, HIVE-11055.2.patch, 
> HIVE-11055.3.patch, HIVE-11055.4.patch, hplsql-site.xml
>
>
> There is PL/HQL tool (www.plhql.org) that implements procedural SQL for Hive 
> (actually any SQL-on-Hadoop implementation and any JDBC source).
> Alan Gates offered to contribute it to Hive under HPL/SQL name 
> (org.apache.hive.hplsql package). This JIRA is to create a patch to 
> contribute  the PL/HQL code. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to