[ 
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_2.patch

I tried my hand at a very rough implementation of the modulus operator as you 
described. Here's the result, assuming my existing modulus function from 
PHOENIX-1068.

Simple tests from sqlline seem to perform as expected, but I have yet to write 
the integration tests. Are there any example integration tests for currently 
supported operators that I can have a look at to base mine off of?

In particular, I'm worried about their being some edge case that I've forgotten 
to check for. A lot of the development here was a game of "fix all of the 
compiler errors and cross your fingers", using whatever was in place for the 
multiply and divide operators as a template.

> 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
>
>
> 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