Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5D9AB200B69 for ; Sat, 6 Aug 2016 06:42:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5C2E4160AB2; Sat, 6 Aug 2016 04:42:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A32F3160A8E for ; Sat, 6 Aug 2016 06:42:21 +0200 (CEST) Received: (qmail 38962 invoked by uid 500); 6 Aug 2016 04:42:20 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 38928 invoked by uid 99); 6 Aug 2016 04:42:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Aug 2016 04:42:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9F7A02C0059 for ; Sat, 6 Aug 2016 04:42:20 +0000 (UTC) Date: Sat, 6 Aug 2016 04:42:20 +0000 (UTC) From: "Lars Hofhansl (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (PHOENIX-3156) DistinctPrefixFilter optimization produces incorrect results with some non-pk WHERE conditions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 06 Aug 2016 04:42:22 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-3156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl resolved PHOENIX-3156. ------------------------------------ Resolution: Fixed Pushed to all 4.8 and 4.x branches and master branch > DistinctPrefixFilter optimization produces incorrect results with some non-pk WHERE conditions > ---------------------------------------------------------------------------------------------- > > Key: PHOENIX-3156 > URL: https://issues.apache.org/jira/browse/PHOENIX-3156 > Project: Phoenix > Issue Type: Bug > Reporter: Lars Hofhansl > Assignee: Lars Hofhansl > Priority: Blocker > Fix For: 4.8.0 > > Attachments: 3156-v2.txt, 3156.txt > > > There's a corner case I found where a DISTINCT and GROUP BY query along a prefix of a compound row key might return incorrect results. > The filter relies on seeing the _0 column absolutely last, and not seeing all Cells that should be filtered. That break in two scenarios: > # we have a table with key (key1, key2, key3) and columns (c1 and c2). Now construct a WHERE , # we force lower key column names. In that case those would sort after the _0 column. The DistinctPrefixFilter would see the _0 column first and skip. > In both case we are effectively changing the order in which the filters are applied. The DistinctPrefixFilter is no longer for the row. > I can fix #1 (by ignoring all Cells other than then _0 one). I do not know how to fix case #2. > I think this is a blocker and we may have to undo the entire DISTINCT and GROUP BY prefix optimization. > [~ankit@apache.org], [~giacomotaylor], [~samarthjain]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)