phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samarth Jain (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2315) Group by fields of primary key columns together with non-primary key columns can give wrong result
Date Sat, 12 Dec 2015 00:30:46 GMT

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

Samarth Jain commented on PHOENIX-2315:
---------------------------------------

+1, looks good.

> Group by fields of primary key columns together with non-primary key columns can give
wrong result
> --------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2315
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2315
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Alicia Ying Shu
>            Assignee: James Taylor
>             Fix For: 4.7.0
>
>         Attachments: PHOENIX-2315.patch
>
>
> create table tgb_counter(tgb_id integer NOT NULL,utc_date_epoch integer NOT NULL,tgb_name
varchar(40),ack_success_count integer,ack_success_one_ack_count integer, CONSTRAINT pk_tgb_counter
PRIMARY KEY(tgb_id, utc_date_epoch)); 
> SELECT tgb_id, tgb_name, (utc_date_epoch/10)*10 AS utc_epoch_hour,SUM(ack_success_count
+ ack_success_one_ack_count) AS ack_tx_sum FROM tgb_counter GROUP BY tgb_id, tgb_name, utc_epoch_hour;
> tgb_name returns NULL.



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

Mime
View raw message