hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Tolpeko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-17027) HPL/SQL requires single quotes for string literals, resulting in surprising behavior
Date Tue, 05 Sep 2017 09:12:01 GMT

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

Dmitry Tolpeko commented on HIVE-17027:
---------------------------------------

There are also issues with variable initialization, I created another ticket: HIVE-17452

> HPL/SQL requires single quotes for string literals, resulting in surprising behavior
> ------------------------------------------------------------------------------------
>
>                 Key: HIVE-17027
>                 URL: https://issues.apache.org/jira/browse/HIVE-17027
>             Project: Hive
>          Issue Type: Bug
>          Components: hpl/sql
>            Reporter: Carter Shanklin
>            Assignee: Dmitry Tolpeko
>            Priority: Critical
>         Attachments: HIVE-17027.1.patch
>
>
> This bug is part of a series of issues and surprising behavior I encountered writing
a reporting script that would aggregate values and give rows different classifications based
on an the aggregate. Addressing some or all of these issues would make HPL/SQL more accessible
to newcomers.
> Consider this script:
> {code}
> CREATE FUNCTION test1()
>   RETURNS STRING
> DECLARE
>   VAR ret string;
> BEGIN
>   ret := 'VALUE IS SET';
>   print(ret);
> END;
> CREATE FUNCTION test2()
>   RETURNS STRING
> DECLARE
>   VAR ret string;
> BEGIN
>   ret := "VALUE IS SET";
>   print(ret);
> END;
> test1();
> test2();
> {code}
> The output of this script is:
> VALUE IS SET
> ret
> Hive accepts both quoting styles. It would be better if HPL/SQL did as well, or threw
an error for th
> e unsupported style.
> Version = 3.0.0-SNAPSHOT r71f52d8ad512904b3f2c4f04fe39a33f2834f1f2



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message