phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3940) NullPointerException on PERCENTILE_CONT over an empty result set
Date Fri, 16 Jun 2017 18:03:00 GMT

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

Hudson commented on PHOENIX-3940:
---------------------------------

FAILURE: Integrated in Jenkins build Phoenix-master #1662 (See [https://builds.apache.org/job/Phoenix-master/1662/])
PHOENIX-3940 Handle PERCENTILE_CONT against no rows (elserj: rev 64121a3c403a3c5206174b33b3c8762d530279f0)
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/PercentileIT.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/PercentileClientAggregator.java


> NullPointerException on PERCENTILE_CONT over an empty result set
> ----------------------------------------------------------------
>
>                 Key: PHOENIX-3940
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3940
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>            Priority: Minor
>             Fix For: 4.12.0
>
>         Attachments: PHOENIX-3940.001.patch, PHOENIX-3940.002.patch
>
>
> A user reported that when running a query with {{PERCENTILE_CONT}} where the selection
has no results (e.g. nothing to compute the P_C on), a NullPointerException is thrown.
> Glancing at the code, it can handle the case where there is only one value, but handling
the case where there are no values fails.
> Reading over Oracle and SqlServer docs, it doesn't saw what "should" happen in these
cases. Is "0" a sane value? Or is an exception actually a good idea?
> https://docs.microsoft.com/en-us/sql/t-sql/functions/percentile-cont-transact-sql
> https://docs.oracle.com/cd/B28359_01/server.111/b28286/functions115.htm#SQLRF00687



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

Mime
View raw message