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

Julian Hyde commented on CALCITE-1095:
--------------------------------------

I agree that the magic numbers suck. As a user you are only really interested 
in the relative order, e.g. does {{=}} have lower, higher or the same 
precedence as {{LIKE}}.

However, we need to let people write user-defined operators, and a precedence 
number seems to be the most convenient way to slot them into the right place in 
the order.

I think we should have a test that sorts all operators based on precedence and 
checks that they come out in the order that we expect, per 
https://github.com/julianhyde/calcite/blob/1095-not-precedence/site/_docs/reference.md#operator-precedence.

> NOT precedence
> --------------
>
>                 Key: CALCITE-1095
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1095
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>             Fix For: 1.9.0
>
>
> The precedence of the NOT operator is currently too high; it should be lower 
> than '='. {{WHERE NOT deptno = 10}} works on other databases.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to