[ 
https://issues.apache.org/jira/browse/PHOENIX-1002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kyle Buzsaki updated PHOENIX-1002:
----------------------------------

    Attachment: PHOENIX-1002_4.patch

Thanks for the detailed explanation, I appreciate the insight :)

Attached is a more-or-less final version of the patch. I've converted the 
ModulusFunction into ModulusExpression, matching the naming scheme of the other 
operators. I've also updated the modulus function unit tests to check the 
modulus operator instead. Finally, I've reordered and squashed several of the 
commits for better readability.

As before, this patch file is relative my patch fixing operator precedence 
issues at PHOENIX-1075

> Add support for % operator
> --------------------------
>
>                 Key: PHOENIX-1002
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1002
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Thomas D'Silva
>         Attachments: PHOENIX-1002.patch, PHOENIX-1002_2.patch, 
> PHOENIX-1002_3.patch, PHOENIX-1002_4.patch
>
>
> Supporting the % operator would allow using sequences to generate IDs that 
> are less than a maximum number. 
> CREATE SEQUENCE foo.bar
> SELECT ((NEXT VALUE FOR foo.bar)%1000)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to