You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Kyle Buzsaki (JIRA)" <ji...@apache.org> on 2014/07/07 19:24:37 UTC

[jira] [Updated] (PHOENIX-1002) Add support for % operator

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

Attached is a patch adding a modulus built-in function and accompanying integration tests. It's not an operator, but it should provide all the same functionality.

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