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

Mihai Budiu commented on CALCITE-6731:
--------------------------------------

I started to review your PR, but there is no spec, so I stopped.

Can you describe here what behavior you want to emulate? Is there a SQL dialect 
which supports these?

How does that dialect behave?

The bitwise operators are relatively clear, but shift raises many questions. 
What is the type of the RHS operand? Can it be negative? Can it be larger than 
the size of the left operand? Is it an arithmetic or a logical shift?

Also, do these operators work on integers only, or also on BINARY values?

Also, please do not keep adding implementations to an existing PR, especially 
an unmerged one, your PR should be broken into 4 PRs, one for each operator.

 

> Add support for ^ and << operators in Calcite
> ---------------------------------------------
>
>                 Key: CALCITE-6731
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6731
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: zhengyu
>            Assignee: krooswu
>            Priority: Major
>              Labels: pull-request-available
>
> version :
> org.apache.calcite:calcite-core:1.35.0 
> config : 
>  
> private static final SqlParser.Config MYSQL_CONFIG = SqlParser.config()
> .withCaseSensitive(false)
> .withUnquotedCasing(Casing.UNCHANGED)
> .withConformance(SqlConformanceEnum.LENIENT)
> .withQuoting(Quoting.BACK_TICK)
> .withLex(Lex.MYSQL)
> .withIdentifierMaxLength(512);
>   sql: SELECT 5 ^ 3   
>  
> SqlNode sqlNode;
> try {
> sqlNode = SqlParser.create(sql, MYSQL_CONFIG).parseStmt();
> } catch (SqlParseException e) {}
>  
> error :
> Encountered "^" at line 1, column 10.
> Was expecting one of:
>     <EOF> 
>     "AS" ...
>     "EXCEPT" ...
>     "FETCH" ...
>     "FROM" ...
>  



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

Reply via email to