[ https://issues.apache.org/jira/browse/PHOENIX-1002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14055670#comment-14055670 ]
Kyle Buzsaki commented on PHOENIX-1002: --------------------------------------- A little more testing from sqlline shows that it doesn't behave well when given operands of the wrong type. When provided with a decimal operand it gives you a big long NullPointerException stack trace instead of the nice TypeMismatch error from providing the wrong type of argument to a function. How would I go about implementing the type checking here? Is the type checking used by the multiply and divide operators a good place to start? > 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)