[
https://issues.apache.org/jira/browse/PHOENIX-2052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593132#comment-14593132
]
PeiLiping commented on PHOENIX-2052:
------------------------------------
create table test(a integer not null,b integer constraint pk primary key (a) ) ;
upsert into test (1,1) ;
upsert into test (2,2) ;
upsert into test (3,3) ;
select * from test ;
+------------------------------------------+------------------------------------------+
| A | B
|
+------------------------------------------+------------------------------------------+
| 1 | 1
|
| 2 | 2
|
| 3 | 3
|
+------------------------------------------+------------------------------------------+
select a , floor( b/2 ) as t from test group by a, t ;
+------------------------------------------+----------------------------------------+
| A | T
|
+------------------------------------------+----------------------------------------+
| 1 | null
|
| 2 | null
|
| 3 | null
|
+------------------------------------------+----------------------------------------+
select a , floor( b*0.5 ) as t from test group by a, t ;
+------------------------------------------+------------------------------------------+
| A | T
|
+------------------------------------------+------------------------------------------+
| 1 | 0
|
| 2 | 1
|
| 3 | 1
|
+------------------------------------------+------------------------------------------+
> Division Bug In Group By SQL The result turn to NULL
> -------------------------------------------------------
>
> Key: PHOENIX-2052
> URL: https://issues.apache.org/jira/browse/PHOENIX-2052
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.3.0
> Environment: hbase 0.98 phoenix 4.3
> Reporter: PeiLiping
> Priority: Critical
>
> when use division in group by sql the result turn to null
> select a , floor( b/4 ) as t from test group by a, t
> null null
> null null
> select a , floor( b * 0.25 ) as t from test group by a, t
> 123 1
> 123 2
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)