You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "huangxiaowei (JIRA)" <ji...@apache.org> on 2017/06/17 07:05:00 UTC

[jira] [Updated] (PHOENIX-3956) NTH_VALUE(R.NAME,2) return null

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

huangxiaowei updated PHOENIX-3956:
----------------------------------
    Description: 
hi,
only one record retrun correctly, others is null
 query SQL:
select R.UID,NTH_VALUE(R.NAME,2) within group(order by R.TM ASC) E1 from BI_SERVER_EVENT R group by R.UID;
result:
+---------------+------------+
|      UID      |     E1     |
+---------------+------------+
| 1Fce4WlZKSfu  | face_reco  |
| 43kFjO5uEpMH  |            |
| 6xNt3lRQ9OGw  |            |
| 9GNuyk7xZ1wo  |            |
| B5Roytcudnwp  |            |
| EmKHvrtnPbyp  |            |
| Eohf9pKdgGU2  |            |
| F2q564YZbApP  |            |
| HskmMNGcYBrU  |            |
| IyEbuzPocVHp  |            |
| JPWkZ1bxVf07  |            |

but the data is not null
the data :
0: jdbc:phoenix:> select UID,count(NAME) from BI_SERVER_EVENT group by UID;
+---------------+--------------+
|      UID      | COUNT(NAME)  |
+---------------+--------------+
| 1Fce4WlZKSfu  | 7            |
| 43kFjO5uEpMH  | 7            |
| 6xNt3lRQ9OGw  | 7            |
| 9GNuyk7xZ1wo  | 7            |
| B5Roytcudnwp  | 7            |
| EmKHvrtnPbyp  | 7            |
| Eohf9pKdgGU2  | 7            |
| F2q564YZbApP  | 7            |
| HskmMNGcYBrU  | 7            |
| IyEbuzPocVHp  | 7            |
| JPWkZ1bxVf07  | 7            |
| KeloBwCp2znx  | 7            |
| LBn7jqesfr60  | 7            |
| OCZ5Dmi2L60M  | 7            |

  was:
hi,
only one record retrun correctly, others is null
 query SQL:
select R.UID,NTH_VALUE(R.NAME,2) within group(order by R.TM ASC) E1 from BI_SERVER_EVENT R group by R.UID;
result:
+---------------+------------+
|      UID      |     E1     |
+---------------+------------+
| 1Fce4WlZKSfu  | face_reco  |
| 43kFjO5uEpMH  |            |
| 6xNt3lRQ9OGw  |            |
| 9GNuyk7xZ1wo  |            |
| B5Roytcudnwp  |            |
| EmKHvrtnPbyp  |            |
| Eohf9pKdgGU2  |            |
| F2q564YZbApP  |            |
| HskmMNGcYBrU  |            |
| IyEbuzPocVHp  |            |
| JPWkZ1bxVf07  |            |

but the data is not null


> NTH_VALUE(R.NAME,2) return null
> -------------------------------
>
>                 Key: PHOENIX-3956
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3956
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.9.0
>         Environment: Linux localhost 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: huangxiaowei
>            Priority: Critical
>             Fix For: 4.9.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> hi,
> only one record retrun correctly, others is null
>  query SQL:
> select R.UID,NTH_VALUE(R.NAME,2) within group(order by R.TM ASC) E1 from BI_SERVER_EVENT R group by R.UID;
> result:
> +---------------+------------+
> |      UID      |     E1     |
> +---------------+------------+
> | 1Fce4WlZKSfu  | face_reco  |
> | 43kFjO5uEpMH  |            |
> | 6xNt3lRQ9OGw  |            |
> | 9GNuyk7xZ1wo  |            |
> | B5Roytcudnwp  |            |
> | EmKHvrtnPbyp  |            |
> | Eohf9pKdgGU2  |            |
> | F2q564YZbApP  |            |
> | HskmMNGcYBrU  |            |
> | IyEbuzPocVHp  |            |
> | JPWkZ1bxVf07  |            |
> but the data is not null
> the data :
> 0: jdbc:phoenix:> select UID,count(NAME) from BI_SERVER_EVENT group by UID;
> +---------------+--------------+
> |      UID      | COUNT(NAME)  |
> +---------------+--------------+
> | 1Fce4WlZKSfu  | 7            |
> | 43kFjO5uEpMH  | 7            |
> | 6xNt3lRQ9OGw  | 7            |
> | 9GNuyk7xZ1wo  | 7            |
> | B5Roytcudnwp  | 7            |
> | EmKHvrtnPbyp  | 7            |
> | Eohf9pKdgGU2  | 7            |
> | F2q564YZbApP  | 7            |
> | HskmMNGcYBrU  | 7            |
> | IyEbuzPocVHp  | 7            |
> | JPWkZ1bxVf07  | 7            |
> | KeloBwCp2znx  | 7            |
> | LBn7jqesfr60  | 7            |
> | OCZ5Dmi2L60M  | 7            |



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)