phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2639) LIKE query against ARRAY of VARCHAR
Date Sat, 30 Jan 2016 06:07:39 GMT

    [ 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='<missing LPAREN>',<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)

Mime
View raw message