phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-1716) queries with to_char() return incorrect results
Date Sun, 24 Jan 2016 19:57:40 GMT

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

James Taylor updated PHOENIX-1716:
----------------------------------
    Labels: verify  (was: )

> 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
>              Labels: verify
>             Fix For: 4.8.0
>
>
> 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
(v6.3.4#6332)

Mime
View raw message