You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2016/06/02 23:12:59 UTC

[jira] [Commented] (HIVE-13540) Casts to numeric types don't seem to work in hplsql

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

Alan Gates commented on HIVE-13540:
-----------------------------------

+1

> Casts to numeric types don't seem to work in hplsql
> ---------------------------------------------------
>
>                 Key: HIVE-13540
>                 URL: https://issues.apache.org/jira/browse/HIVE-13540
>             Project: Hive
>          Issue Type: Bug
>          Components: hpl/sql
>    Affects Versions: 2.2.0
>            Reporter: Carter Shanklin
>            Assignee: Dmitry Tolpeko
>         Attachments: HIVE-13540.1.patch
>
>
> Maybe I'm doing this wrong? But it seems to be broken.
> Casts to string types seem to work fine, but not numbers.
> This code:
> {code}
> temp_int     = CAST('1' AS int);
> print temp_int
> temp_float   = CAST('1.2' AS float);
> print temp_float
> temp_double  = CAST('1.2' AS double);
> print temp_double
> temp_decimal = CAST('1.2' AS decimal(10, 4));
> print temp_decimal
> temp_string = CAST('1.2' AS string);
> print temp_string
> {code}
> Produces this output:
> {code}
> [vagrant@hdp250 hplsql]$ hplsql -f temp2.hplsql
> which: no hbase in (/usr/lib64/qt-3.3/bin:/usr/lib/jvm/java/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/puppetlabs/bin:/usr/local/share/jmeter/bin:/home/vagrant/bin)
> WARNING: Use "yarn jar" to launch YARN applications.
> null
> null
> null
> null
> 1.2
> {code}
> The software I'm using is not anything released but is pretty close to the trunk, 2 weeks old at most.



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