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

Julian Hyde commented on PHOENIX-3477:
--------------------------------------

I don't think we need arithmetic "inside a sequence". In your query, the parser 
should treat {{NEXT VALUE FOR foo.bar}} as an atom, evaluate it, and add one to 
it.

Does the following query work: {{SELECT (NEXT VALUE FOR foo.bar) + 1 FROM 
SYSTEM.SEQUENCE}}? If it does, the issue is just precedence in the parser.

If this behavior is the same in Calcite, please log a Calcite bug.

> Support sequence arithmetic in Calcite-Phoenix
> ----------------------------------------------
>
>                 Key: PHOENIX-3477
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3477
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Eric Lomore
>            Assignee: Eric Lomore
>
> For this feature we are missing two components:
> 1. The parser currently doesn't recognize arithmetic inside sequences
> 2. Calcite does not support these operations
> {{SELECT NEXT VALUE FOR foo.bar+1 FROM SYSTEM.SEQUENCE.}}



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

Reply via email to