[ 
https://issues.apache.org/jira/browse/CALCITE-7512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079963#comment-18079963
 ] 

Julian Hyde commented on CALCITE-7512:
--------------------------------------

[~terran2010], Since you're not logging a bug, don't post an error stack. No 
one claimed that this should work, so you don't need to prove that it doesn't. 
Instead we need a concise description of the feature. A link to Postgres doc 
isn't sufficient. Give the syntax of the feature, briefly describe what it 
does, and a give an example. Discuss whether this feature exists in other DBs 
and/or standard SQL. What would the implementation entail - just a new 
function, or changes to the parser and/or validator?

> Support array operators for PostgreSql
> --------------------------------------
>
>                 Key: CALCITE-7512
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7512
>             Project: Calcite
>          Issue Type: New Feature
>          Components: babel
>    Affects Versions: 1.41.0
>            Reporter: terran2010
>            Priority: Major
>              Labels: pull-request-available
>
> When execute sql with babel:
> {code:java}
> SELECT ARRAY[1,2,3] @> ARRAY[1,2] {code}
> now will run error:
> {code:java}
> Caused by: org.apache.calcite.sql.parser.babel.TokenMgrError: Lexical error 
> at line 1, column 21.  Encountered: "@" (64), after : ""  at 
> org.apache.calcite.sql.parser.babel.SqlBabelParserImplTokenManager.getNextToken(SqlBabelParserImplTokenManager.java:26853)
>    at 
> org.apache.calcite.sql.parser.babel.SqlBabelParserImpl.jj_scan_token(SqlBabelParserImpl.java:41652)
>   at 
> org.apache.calcite.sql.parser.babel.SqlBabelParserImpl.jj_3_414(SqlBabelParserImpl.java:31680)
>        at 
> org.apache.calcite.sql.parser.babel.SqlBabelParserImpl.jj_2_414(SqlBabelParserImpl.java:14651)
>        at 
> org.apache.calcite.sql.parser.babel.SqlBabelParserImpl.AddExpression2b(SqlBabelParserImpl.java:4917)
>  at 
> org.apache.calcite.sql.parser.babel.SqlBabelParserImpl.Expression2(SqlBabelParserImpl.java:4956)
>      at 
> org.apache.calcite.sql.parser.babel.SqlBabelParserImpl.Expression(SqlBabelParserImpl.java:4805)
>       at 
> org.apache.calcite.sql.parser.babel.SqlBabelParserImpl.SelectExpression(SqlBabelParserImpl.java:2816)
>  {code}
> We can refer postgresql document about Position: 
> [https://www.postgresql.org/docs/current/functions-array.html]
> We can consider supporting the above situation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to