You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Dmitry Tolpeko (JIRA)" <ji...@apache.org> on 2017/09/07 09:19:00 UTC
[jira] [Assigned] (HIVE-17032) HPL/SQL Comparisons are only
supported with strings and integers
[ https://issues.apache.org/jira/browse/HIVE-17032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry Tolpeko reassigned HIVE-17032:
-------------------------------------
Assignee: Dmitry Tolpeko
> HPL/SQL Comparisons are only supported with strings and integers
> ----------------------------------------------------------------
>
> Key: HIVE-17032
> URL: https://issues.apache.org/jira/browse/HIVE-17032
> Project: Hive
> Issue Type: Bug
> Components: hpl/sql
> Reporter: Carter Shanklin
> Assignee: Dmitry Tolpeko
> Priority: Critical
>
> 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.
> In Var.java:
> {code}
> public int compareTo(Var v) {
> if (this == v) {
> return 0;
> }
> else if (v == null) {
> return -1;
> }
> else if (type == Type.BIGINT && v.type == Type.BIGINT) {
> return ((Long)value).compareTo((Long)v.value);
> }
> else if (type == Type.STRING && v.type == Type.STRING) {
> return ((String)value).compareTo((String)v.value);
> }
> return -1;
> }
> {code}
> It's surprising that comparisons with doubles and decimals (for example) don't work as expected.
> Version = 3.0.0-SNAPSHOT r71f52d8ad512904b3f2c4f04fe39a33f2834f1f2
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)