phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1237) COALESCE Function - type of second parameter
Date Thu, 18 Sep 2014 23:33:33 GMT

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

Hudson commented on PHOENIX-1237:
---------------------------------

SUCCESS: Integrated in Phoenix | 4.0 | Hadoop2 #137 (See [https://builds.apache.org/job/Phoenix-4.0-hadoop2/137/])
PHOENIX-1237 COALESCE Function - type of second parameter (Vaclav Loffelmann) (jtaylor: rev
c84b5f9251160a4a28267b2e6cb3b3cf5ac93442)
* phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/function/CoalesceFunction.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java


> COALESCE Function - type of second parameter
> --------------------------------------------
>
>                 Key: PHOENIX-1237
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1237
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 5.0.0, 3.1, 4.1
>            Reporter: Vaclav Loffelmann
>            Assignee: Vaclav Loffelmann
>             Fix For: 5.0.0, 4.2, 3.2
>
>         Attachments: PHOENIX-1237.fix.patch, PHOENIX-1237.fix2.patch, PHOENIX-1237.fix3-master.patch,
PHOENIX_1237.patch
>
>
> There is an issue with automatic set data type of second parameter to coalesce function.
> For instance table:
> {code:sql}
> CREATE TABLE IF NOT EXISTS TEST_COALESCE(
> ID BIGINT NOT NULL,
> COUNT UNSIGNED_INT
> CONSTRAINT pk PRIMARY KEY(ID));
> {code}
> and query:
> {code:sql}
> SELECT COALESCE(SUM(COUNT), 0) FROM TEST_SUM GROUP BY ID;
> {code}
> This will cause in:
> {quote}SQLException: ERROR 507 (42846): Cannot convert type. COALESCE expected UNSIGNED_INT,
but got INTEGER {quote}
> Hence second parameter is typed to its input value (eg. 0 is signed int not long), and
long is expected. That is cause for ArrayIndexOutOfBoundsException described in PHOENIX-1229.



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

Mime
View raw message