phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas D'Silva (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PHOENIX-1716) queries with to_char() return incorrect results
Date Fri, 18 Jan 2019 22:46:00 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas D'Silva resolved PHOENIX-1716.
-------------------------------------
       Resolution: Not A Problem
    Fix Version/s:     (was: 4.15.0)

> queries with to_char() return incorrect results
> -----------------------------------------------
>
>                 Key: PHOENIX-1716
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1716
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.2.0
>            Reporter: Jonathan Leech
>            Priority: Major
>              Labels: verify
>
> Using to_char() in a nested query causes it to get confused and return the value of the
first column twice. 
> Example:
> select 
>  to_char(case when foo < 0 then 18446744073709551616.0 + foo else foo end, '0') foo,
>  to_char(case when bar < 0 then 18446744073709551616.0 + bar else bar end, '0') bar
> from (
> select cast(12345 as bigint) foo, cast(233456 as bigint) bar  from system."SEQUENCE"
limit 1
> );
> Workarounds: Use different but equivalent format strings in each column, make subtle
changes to the beginning of the columns; e.g. change to 0 + case when..., 0.0 + case when....



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message