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

Hudson commented on PHOENIX-1016:
---------------------------------

FAILURE: Integrated in Phoenix | Master | Hadoop1 #282 (See 
[https://builds.apache.org/job/Phoenix-master-hadoop1/282/])
PHOENIX-1016 Support MINVALUE, MAXVALUE, and CYCLE options in CREATE SEQUENCE 
(Thomas D'Silva) (jtaylor: rev 9b9c86808e61382fc14306ea0aa5762815cc2ebf)
* 
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
* 
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
* phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
* phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
* 
phoenix-core/src/test/java/org/apache/phoenix/compile/TenantSpecificViewIndexCompileTest.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/Sequence.java
* 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/SequenceRegionObserver.java
* phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
* 
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
* 
phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java
* phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
* 
phoenix-core/src/main/java/org/apache/phoenix/parse/CreateSequenceStatement.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/SequenceInfo.java
* phoenix-core/src/main/java/org/apache/phoenix/util/KeyValueUtil.java
* 
phoenix-core/src/main/java/org/apache/phoenix/compile/CreateSequenceCompiler.java
* phoenix-core/src/main/java/org/apache/phoenix/parse/SelectStatement.java
* phoenix-core/src/main/antlr3/PhoenixSQL.g
* phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceIT.java
* phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
* phoenix-core/src/main/java/org/apache/phoenix/query/QueryConstants.java
* phoenix-core/src/test/java/org/apache/phoenix/util/SequenceUtilTest.java
* 
phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
* 
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
* phoenix-core/src/main/java/org/apache/phoenix/util/SequenceUtil.java


> Support MINVALUE, MAXVALUE, and CYCLE options in CREATE SEQUENCE
> ----------------------------------------------------------------
>
>                 Key: PHOENIX-1016
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1016
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>             Fix For: 5.0.0, 3.1, 4.1
>
>         Attachments: AddSeqColumns.txt, PHOENIX-1016-3.1.v3.patch, 
> PHOENIX-1016-3.1.v4.patch, PHOENIX-1016-3.1.v5.patch, 
> PHOENIX-1016-4.1.v3.patch, PHOENIX-1016-4.1.v4.patch, PHOENIX-1016.3.0.patch, 
> PHOENIX-1016.patch, PHOENIX-1016.v2.3.0.patch, PHOENIX-1016.v2.patch, 
> PHOENIX-1016.v5.patch, diff.txt
>
>
> We currently don't support MINVALUE, MAXVALUE, and CYCLE options in CREATE 
> SEQUENCE, but we should. See 
> http://msdn.microsoft.com/en-us/library/ff878091.aspx for the syntax.
> I believe MINVALUE applies if the INCREMENT is negative while MAXVALUE 
> applies otherwise. If the value of a sequence goes beyond MINVALUE/MAXVALUE, 
> then:
> - if CYCLE is true, then the sequence value should start again at the START 
> WITH value (or the MINVALUE if specified too? Not sure about this).
> - if CYCLE is false, then an exception should be thrown.
> To implement this:
> - make the grammar changes in PhoenixSQL.g
> - add member variables for MINVALUE, MAXVALUE, and CYCLE to 
> CreateSequenceStatement
> - add the appropriate error checking and handle bind variables for these new 
> options in CreateSequenceCompiler
> - modify the MetaDataClient.createSequence() call by passing along these new 
> parameters.
> - same for ConnectionQueryServices.createSequence() call
> - same for Sequence.createSequence().
> - pass along these parameters as new KeyValues in the Append that constitutes 
> the RPC call
> - act on these in the SequenceRegionObserver coprocessor as indicated above.



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

Reply via email to