You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2016/01/24 02:52:39 UTC
[jira] [Updated] (PHOENIX-1716) queries with to_char() return
incorrect results
[ https://issues.apache.org/jira/browse/PHOENIX-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Taylor updated PHOENIX-1716:
----------------------------------
Fix Version/s: 4.8.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
> 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)