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 45EF5200B72 for ; Fri, 26 Aug 2016 20:47:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 44619160AB6; Fri, 26 Aug 2016 18:47: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 B27EA160A94 for ; Fri, 26 Aug 2016 20:47:21 +0200 (CEST) Received: (qmail 43593 invoked by uid 500); 26 Aug 2016 18:47: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 43580 invoked by uid 99); 26 Aug 2016 18:47:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2016 18:47:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9479F2C0032 for ; Fri, 26 Aug 2016 18:47:20 +0000 (UTC) Date: Fri, 26 Aug 2016 18:47:20 +0000 (UTC) From: "Kevin Liew (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-2641) Implicit wildcard in LIKE predicate search pattern MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 26 Aug 2016 18:47:22 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-2641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15439553#comment-15439553 ] Kevin Liew commented on PHOENIX-2641: ------------------------------------- The query compiler compiled single wildcard (`%` and `_`) expressions to null expressions. Now it only does that for `%`. > Implicit wildcard in LIKE predicate search pattern > -------------------------------------------------- > > Key: PHOENIX-2641 > URL: https://issues.apache.org/jira/browse/PHOENIX-2641 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.7.0 > Environment: Phoenix 4.7.0 on Calcite 1.5.0 > Reporter: Kevin Liew > Assignee: Kevin Liew > Labels: newbie > > LIKE predicates have an implicit wildcard at the end of the search pattern > ie. > {code:sql}select distinct at1.col2 from at1 group by at1.col2 having at1.col2 like '_'{code} > will match every cell in col2 whereas it should only match single-character cells. > This affects both VARCHAR and CHAR. > Note that selecting by pattern '__' (two single-character wildcards) works properly for VARCHAR but not for CHAR (no result). -- This message was sent by Atlassian JIRA (v6.3.4#6332)