[
https://issues.apache.org/jira/browse/PHOENIX-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lars Hofhansl updated PHOENIX-2987:
-----------------------------------
Attachment: 2987.txt
Here's a simple fix with test.
Uses a trick to set the length of the initial ImmutableBytesWritable to -1, so
it will never equal to a real value.
That fixes the problem.
This is a simple fix, I'm just going to commit it.
> DISTINCT/GROUP BY optimization not correct for null values in key parts
> -----------------------------------------------------------------------
>
> Key: PHOENIX-2987
> URL: https://issues.apache.org/jira/browse/PHOENIX-2987
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Lars Hofhansl
> Fix For: 4.8.0
>
> Attachments: 2987.txt
>
>
> During forward scans with the DistinctPrefix filter set null values are not
> returned.
> The reason is that that lastKey is initialized with
> ByteUtil.EMPTY_BYTE_ARRAY, which happens to the equal to a null value in a
> key part. So the filter determines it has seen the value before.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)