[
https://issues.apache.org/jira/browse/PHOENIX-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14176437#comment-14176437
]
ASF GitHub Bot commented on PHOENIX-1344:
-----------------------------------------
GitHub user tzolkincz opened a pull request:
https://github.com/apache/phoenix/pull/24
PHOENIX-1344 fix duplicit values in NTH_VALUE function
I've fixed issue PHOENIX-1344, but there is one thing: the NTH_VALUE
function is not deterministic now. Nondeterministic come to light when nth
value could be any of values as long as "ordered by" values are duplicit.
Methond getDeterminism is implemented in parent: AggregateFunction and returns
Determinism.PER_ROW. Is that ok?
I've used LinkedList (over ArrayDeque) for storing multiple values to one
"ordered by" key cos LinkedList can hold null values and there can be in future
switch for respect null values.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tzolkincz/phoenix fix_1344
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/phoenix/pull/24.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #24
----
commit 980c65d251cccd80a87e54449a1afe4a550a6448
Author: Vaclav Loffelmann <[email protected]>
Date: 2014-10-19T15:18:00Z
PHOENIX-1344 fix duplicit values in NTH_VALUE function
----
> NTH_VALUE function skips duplicit values in order by
> ----------------------------------------------------
>
> Key: PHOENIX-1344
> URL: https://issues.apache.org/jira/browse/PHOENIX-1344
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 3.0-Release, 5.0.0, 4.2
> Reporter: Vaclav Loffelmann
> Assignee: Vaclav Loffelmann
> Attachments: nthValueFunctionSnippet.java, sqlForBugReproduce.sql
>
>
> The NTH_VALUE function creates unique of order by values before sorting.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)