Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E3BBE188CA for ; Sat, 30 Jan 2016 06:07:51 +0000 (UTC) Received: (qmail 13713 invoked by uid 500); 30 Jan 2016 06:07:51 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 13646 invoked by uid 500); 30 Jan 2016 06:07:51 -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 13635 invoked by uid 99); 30 Jan 2016 06:07:51 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Jan 2016 06:07:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3163A180546 for ; Sat, 30 Jan 2016 06:07:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.247 X-Spam-Level: * X-Spam-Status: No, score=1.247 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id uGDPqL2xvUeo for ; Sat, 30 Jan 2016 06:07:41 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id D8F4120C6A for ; Sat, 30 Jan 2016 06:07:40 +0000 (UTC) Received: (qmail 13448 invoked by uid 99); 30 Jan 2016 06:07:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Jan 2016 06:07:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E03572C0AFA for ; Sat, 30 Jan 2016 06:07:39 +0000 (UTC) Date: Sat, 30 Jan 2016 06:07:39 +0000 (UTC) From: "ramkrishna.s.vasudevan (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-2639) LIKE query against ARRAY of VARCHAR MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124758#comment-15124758 ] ramkrishna.s.vasudevan commented on PHOENIX-2639: ------------------------------------------------- I tried some time to change this rule but was not successful. Let me spend some time on Monday on this. > LIKE query against ARRAY of VARCHAR > ----------------------------------- > > Key: PHOENIX-2639 > URL: https://issues.apache.org/jira/browse/PHOENIX-2639 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.5.2 > Reporter: Tony Winingham > Fix For: 4.8.0 > > > LIKE query against individual array elements works as expected: > 0: jdbc:phoenix:xxx.xxx.com:5> select src_ip_legacy,dst_ip_legacy,app_protocol_details from ironflows WHERE app_protocol_details[1] LIKE '%espn%' limit 10; > +------------------------------------------+------------------------------------------+------------------------------------------+ > | SRC_IP_LEGACY | DST_IP_LEGACY | APP_PROTOCOL_DETAILS | > +------------------------------------------+------------------------------------------+------------------------------------------+ > ((OUTPUT REMOVED)) > LIKE query against ANY() or ALL() array elements fails: > 0: jdbc:phoenix:cloud1.crucible.irondev.net:5> select src_ip_legacy,dst_ip_legacy,app_protocol_details from ironflows WHERE '%espn%' LIKE ANY(app_protocol_details) limit 10; > Error: ERROR 602 (42P00): Syntax error. Missing "LPAREN" at line 1, column 78. (state=42P00,code=602) > org.apache.phoenix.exception.PhoenixParserException: ERROR 602 (42P00): Syntax error. Missing "LPAREN" at line 1, column 78. > at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33) > at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111) > at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1225) > at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1306) > at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1369) > at sqlline.Commands.execute(Commands.java:822) > at sqlline.Commands.sql(Commands.java:732) > at sqlline.SqlLine.dispatch(SqlLine.java:808) > at sqlline.SqlLine.begin(SqlLine.java:681) > at sqlline.SqlLine.start(SqlLine.java:398) > at sqlline.SqlLine.main(SqlLine.java:292) > Caused by: MissingTokenException(inserted [@-1,0:0='',<90>,1:77] at %espn%) > at org.apache.phoenix.parse.PhoenixSQLParser.recoverFromMismatchedToken(PhoenixSQLParser.java:347) > at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115) > at org.apache.phoenix.parse.PhoenixSQLParser.not_expression(PhoenixSQLParser.java:6364) > at org.apache.phoenix.parse.PhoenixSQLParser.and_expression(PhoenixSQLParser.java:6184) > at org.apache.phoenix.parse.PhoenixSQLParser.or_expression(PhoenixSQLParser.java:6121) > at org.apache.phoenix.parse.PhoenixSQLParser.expression(PhoenixSQLParser.java:6086) > at org.apache.phoenix.parse.PhoenixSQLParser.single_select(PhoenixSQLParser.java:4289) > at org.apache.phoenix.parse.PhoenixSQLParser.unioned_selects(PhoenixSQLParser.java:4371) > at org.apache.phoenix.parse.PhoenixSQLParser.select_node(PhoenixSQLParser.java:4436) > at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:755) > at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:497) > at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108) > ... 9 more -- This message was sent by Atlassian JIRA (v6.3.4#6332)