You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Eric Evans (JIRA)" <ji...@apache.org> on 2011/03/02 21:52:36 UTC

[jira] Created: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

use o.a.c.marshal.*Type for CQL 
--------------------------------

                 Key: CASSANDRA-2262
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
             Project: Cassandra
          Issue Type: Sub-task
          Components: API
    Affects Versions: 0.8
            Reporter: Eric Evans
            Priority: Minor
             Fix For: 0.8
         Attachments: v0-0001-test-shows-no-roundtrip-in-BytesType.txt

Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).

Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}

Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v4-0004-assume-utf8-in-CliTest-keys-dammit.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004207#comment-13004207 ] 

Eric Evans commented on CASSANDRA-2262:
---------------------------------------

+1 to v5-000[1-4]

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v4-0001-test-shows-no-roundtrip-in-BytesType.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v5-0001-test-shows-no-roundtrip-in-BytesType.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.t
 xt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Issue Comment Edited: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004210#comment-13004210 ] 

Gary Dusbabek edited comment on CASSANDRA-2262 at 3/8/11 9:48 PM:
------------------------------------------------------------------

bq. 0006 expands TimeUUIDType.fromString to support parsing all of the CQL supported formats.
This looks good, but deserves a unit test.
+1 on the rest.

      was (Author: gdusbabek):
    bq. 0006 expands TimeUUIDType.fromString to support parsing all of the CQL supported formats.
This looks good, but deserves a unit test.
  
> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.t
 xt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment: v6-0008-unit-test-for-TimeUUIDType.fromString.txt
                v6-0007-catch-MarshallException-raise-RuntimeException.txt
                v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt
                v6-0005-AbstractType.fromsString-throws-MarshalException.txt
                v6-0004-assume-utf8-in-CliTest-keys-dammit.txt
                v6-0003-compose-method-for-AbstractTypes.txt
                v6-0002-BytesType.fromString-expects-a-hex-string.txt
                v6-0001-test-shows-no-roundtrip-in-BytesType.txt

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.t
 xt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v0-0001-test-shows-no-roundtrip-in-BytesType.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-test-shows-no-roundtrip-in-BytesType.txt, v1-0002-BytesType.fromString-expects-a-hex-string.txt, v1-0003-compose-method-for-AbstractTypes.txt, v1-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002275#comment-13002275 ] 

Gary Dusbabek commented on CASSANDRA-2262:
------------------------------------------

Yes. I'm reworking those tests to do just that.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-test-shows-no-roundtrip-in-BytesType.txt, v1-0002-BytesType.fromString-expects-a-hex-string.txt, v1-0003-compose-method-for-AbstractTypes.txt, v1-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004055#comment-13004055 ] 

Gary Dusbabek commented on CASSANDRA-2262:
------------------------------------------

v5 integrates Eric's changes and Sylvain's suggestions, except for the BBU/FBU changes.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v5-0003-compose-method-for-AbstractTypes.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.t
 xt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment: v5-0007-catch-MarshalException-raise-RuntimeException.txt
                v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt
                v5-0005-AbstractType.fromString-throws-MarshalException.txt
                v5-0004-assume-utf8-in-CliTest-keys-dammit.txt
                v5-0003-compose-method-for-AbstractTypes.txt
                v5-0002-BytesType.fromString-expects-a-hex-string.txt
                v5-0001-test-shows-no-roundtrip-in-BytesType.txt

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v4-0001-test-shows-no-roundtrip-in-BytesType.txt, v4-0002-BytesType.fromString-expects-a-hex-string.txt, v4-0003-compose-method-for-AbstractTypes.txt, v4-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001643#comment-13001643 ] 

Jonathan Ellis commented on CASSANDRA-2262:
-------------------------------------------

bq. Asking for fromString() to accept a hex value seems silly

Why is that?

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v0-0001-test-shows-no-roundtrip-in-BytesType.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment: v4-0004-assume-utf8-in-CliTest-keys-dammit.txt
                v4-0003-compose-method-for-AbstractTypes.txt
                v4-0002-BytesType.fromString-expects-a-hex-string.txt
                v4-0001-test-shows-no-roundtrip-in-BytesType.txt

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v4-0001-test-shows-no-roundtrip-in-BytesType.txt, v4-0002-BytesType.fromString-expects-a-hex-string.txt, v4-0003-compose-method-for-AbstractTypes.txt, v4-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004337#comment-13004337 ] 

Hudson commented on CASSANDRA-2262:
-----------------------------------

Integrated in Cassandra #764 (See [https://hudson.apache.org/hudson/job/Cassandra/764/])
    

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002258#comment-13002258 ] 

Sylvain Lebresne commented on CASSANDRA-2262:
---------------------------------------------

bq. Can you elaborate?

I mean that the ticket description said that we should have get(from(s)) == s, but some of the test in RoundTripTest actually test from(get(b)) == b (all of them except for the two UUID tests). So this is not really testing what it should. And this is not the same since for instance, get(from(s)) always work for IntegerType while from(get(b)) can throw an exception (and thus not work) depending on what is b as shown by testInteger2.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-test-shows-no-roundtrip-in-BytesType.txt, v1-0002-BytesType.fromString-expects-a-hex-string.txt, v1-0003-compose-method-for-AbstractTypes.txt, v1-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2262:
--------------------------------------

    Reviewer: slebresne

I take it compose() is "give me a Java object that this value represents?"

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-test-shows-no-roundtrip-in-BytesType.txt, v1-0002-BytesType.fromString-expects-a-hex-string.txt, v1-0003-compose-method-for-AbstractTypes.txt, v1-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v5-0004-assume-utf8-in-CliTest-keys-dammit.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.t
 xt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003355#comment-13003355 ] 

Gary Dusbabek commented on CASSANDRA-2262:
------------------------------------------

bq. Yes. I'm reworking those tests to do just that.
Those tests are attached now.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v1-0002-BytesType.fromString-expects-a-hex-string.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001624#comment-13001624 ] 

Gary Dusbabek commented on CASSANDRA-2262:
------------------------------------------

Shows that the string->bytes->string round-tripping doesn't work for BytesType.  I'm not sure what the best approach is there.  Asking for fromString() to accept a hex value seems silly.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v0-0001-test-shows-no-roundtrip-in-BytesType.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v4-0003-compose-method-for-AbstractTypes.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v2-0002-BytesType.fromString-expects-a-hex-string.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001645#comment-13001645 ] 

Gary Dusbabek commented on CASSANDRA-2262:
------------------------------------------

bq. Why is that?
It didn't follow naturally for me.  But I suppose if we don't use hex, there are a great many byte arrays that have no real string representation.  It seems less silly now.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v0-0001-test-shows-no-roundtrip-in-BytesType.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment: v1-0004-assume-utf8-in-CliTest-keys-dammit.txt
                v1-0003-compose-method-for-AbstractTypes.txt
                v1-0002-BytesType.fromString-expects-a-hex-string.txt
                v1-0001-test-shows-no-roundtrip-in-BytesType.txt

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-test-shows-no-roundtrip-in-BytesType.txt, v1-0002-BytesType.fromString-expects-a-hex-string.txt, v1-0003-compose-method-for-AbstractTypes.txt, v1-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek reassigned CASSANDRA-2262:
----------------------------------------

    Assignee: Gary Dusbabek

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v0-0001-test-shows-no-roundtrip-in-BytesType.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004242#comment-13004242 ] 

Eric Evans commented on CASSANDRA-2262:
---------------------------------------

+1 on the test!

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003362#comment-13003362 ] 

Sylvain Lebresne commented on CASSANDRA-2262:
---------------------------------------------

In LongType, compose() uses relative getLong(), which modifies the argument. It needs an absolute get instead (there is already a toInt() for that in BBUtil, we can add a toLong() and use it here).

Apart from that, some minor nitpicks:
  * In BytesType, we have a BBUtil.hexToBytes() instead of the FBUtil one with a wrap.
  * Counters could have a compose returning a Long. That would mean give a Long as the type parameter for AbstractCommutativeType, which breaks its supposed generality, but we never use this for anything else than counters anyway (I actually think we should get rid of AbstractCommutativeType since I'm not sure we have another "commutative type" very soon if ever).
  * compose() has an @Override annotations in BytesType, LexicalUUIDType and LocalByPartitioner (which it shouldn't as of the codeStyle)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v5-0007-catch-MarshalException-raise-RuntimeException.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v1-0003-compose-method-for-AbstractTypes.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002271#comment-13002271 ] 

Jonathan Ellis commented on CASSANDRA-2262:
-------------------------------------------

bq. the ticket description said that we should have get(from(s)) == s, but some of the test in RoundTripTest actually test from(get(b)) == b

don't we want to test both?

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-test-shows-no-roundtrip-in-BytesType.txt, v1-0002-BytesType.fromString-expects-a-hex-string.txt, v1-0003-compose-method-for-AbstractTypes.txt, v1-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v1-0004-assume-utf8-in-CliTest-keys-dammit.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment: v2-0004-assume-utf8-in-CliTest-keys-dammit.txt
                v2-0003-compose-method-for-AbstractTypes.txt
                v2-0002-BytesType.fromString-expects-a-hex-string.txt
                v2-0001-test-shows-no-roundtrip-in-BytesType.txt

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-test-shows-no-roundtrip-in-BytesType.txt, v1-0002-BytesType.fromString-expects-a-hex-string.txt, v1-0003-compose-method-for-AbstractTypes.txt, v1-0004-assume-utf8-in-CliTest-keys-dammit.txt, v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004210#comment-13004210 ] 

Gary Dusbabek commented on CASSANDRA-2262:
------------------------------------------

bq. 0006 expands TimeUUIDType.fromString to support parsing all of the CQL supported formats.
This looks good, but deserves a unit test.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-2262:
----------------------------------

    Attachment: v3-0008-remove-Override-annotations.txt
                v3-0007-catch-MarshalException-raise-RuntimeException.txt
                v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt
                v3-0005-AbstractType.fromString-throws-MarshalException.txt
                v3-0004-assume-utf8-in-CliTest-keys-dammit.txt
                v3-0003-compose-method-for-AbstractTypes.txt
                v3-0002-BytesType.fromString-expects-a-hex-string.txt
                v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002196#comment-13002196 ] 

Gary Dusbabek commented on CASSANDRA-2262:
------------------------------------------

bq. Last remark, the tests of the first patch are testing the wrong equation.
Can you elaborate?

as for testInteger2(), that should produce the buffer error as you later expected.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-test-shows-no-roundtrip-in-BytesType.txt, v1-0002-BytesType.fromString-expects-a-hex-string.txt, v1-0003-compose-method-for-AbstractTypes.txt, v1-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v4-0002-BytesType.fromString-expects-a-hex-string.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v5-0005-AbstractType.fromString-throws-MarshalException.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.t
 xt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002089#comment-13002089 ] 

Sylvain Lebresne commented on CASSANDRA-2262:
---------------------------------------------

I don't think that matter for the purpose of this ticket, but as a remark, IntegerType doesn't always roundtrip correctly. For example
{noformat}
    @Test
    public void testInteger2()
    {
        long v = 1;
        ByteBuffer bb = ByteBuffer.allocate(8);
        bb.putLong(v);
        bb.flip();
        String s = IntegerType.instance.getString(bb);
        ByteBuffer internal = IntegerType.instance.fromString(s);
        assert internal.getLong() == v;
    }
{noformat}
fails (while it works on LongType) because of the internal use of BigInteger that pack the bytes as tightly as possible.

This is probably fine since
{noformat}
     IntegerType.getString(IntegerType.fromString(s)) == s
{noformat}
always holds. It's
{noformat}
     IntegerType.fromString(IntegerType.getString(b)) == b
{noformat}
that doesn't always hold.

Last remark, the tests of the first patch are testing the wrong equation.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-test-shows-no-roundtrip-in-BytesType.txt, v1-0002-BytesType.fromString-expects-a-hex-string.txt, v1-0003-compose-method-for-AbstractTypes.txt, v1-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v2-0001-test-shows-no-roundtrip-in-BytesType.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v2-0003-compose-method-for-AbstractTypes.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v2-0004-assume-utf8-in-CliTest-keys-dammit.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0001-test-shows-no-roundtrip-in-BytesType.txt, v5-0002-BytesType.fromString-expects-a-hex-string.txt, v5-0003-compose-method-for-AbstractTypes.txt, v5-0004-assume-utf8-in-CliTest-keys-dammit.txt, v5-0005-AbstractType.fromString-throws-MarshalException.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004053#comment-13004053 ] 

Eric Evans commented on CASSANDRA-2262:
---------------------------------------

I'm starting see ugly conflicts in my future; Hopefully I can piggy back on Gary's patches here without making a mess of things.

The attached v3* patches are:

0001-0004 Gary's patches rebased to trunk (any errors are mine).

0005 updates {{fromString}} to throw a {{o.a.c.db.marshal.MarshalException}}, instead of {{RuntimeException}} so that they can be caught in CQL to return error messages.

0006 expands {{TimeUUIDType.fromString}} to support parsing all of the CQL supported formats.

0007 adds exception handling to existing uses of {{AbstractType.fromString}}

0008 removes the Override annotations from BytesType, LexicalUUIDType and LocalByPartitioner.


bq. In BytesType, we have a BBUtil.hexToBytes() instead of the FBUtil one with a wrap.

What's the reasoning here?  BBUtil.hexToBytes() invokes FBUtilities.hexToBytes.

bq. Counters could have a compose returning a Long. That would mean give a Long as the type parameter for AbstractCommutativeType, which breaks its supposed generality, but we never use this for anything else than counters anyway (I actually think we should get rid of AbstractCommutativeType since I'm not sure we have another "commutative type" very soon if ever).

I'm not up enough on the counters to judge one way or another, but it doesn't seem like something that would need to hold this ticket up.

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v4-0001-test-shows-no-roundtrip-in-BytesType.txt, v4-0002-BytesType.fromString-expects-a-hex-string.txt, v4-0003-compose-method-for-AbstractTypes.txt, v4-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v1-0001-test-shows-no-roundtrip-in-BytesType.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v2-0001-test-shows-no-roundtrip-in-BytesType.txt, v2-0002-BytesType.fromString-expects-a-hex-string.txt, v2-0003-compose-method-for-AbstractTypes.txt, v2-0004-assume-utf8-in-CliTest-keys-dammit.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-2262:
-------------------------------------

    Attachment:     (was: v5-0002-BytesType.fromString-expects-a-hex-string.txt)

> use o.a.c.marshal.*Type for CQL 
> --------------------------------
>
>                 Key: CASSANDRA-2262
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2262
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-2262-test-shows-no-roundtrip-in-BytesType.txt, v3-0002-BytesType.fromString-expects-a-hex-string.txt, v3-0003-compose-method-for-AbstractTypes.txt, v3-0004-assume-utf8-in-CliTest-keys-dammit.txt, v3-0005-AbstractType.fromString-throws-MarshalException.txt, v3-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v3-0007-catch-MarshalException-raise-RuntimeException.txt, v3-0008-remove-Override-annotations.txt, v5-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v5-0007-catch-MarshalException-raise-RuntimeException.txt, v6-0001-test-shows-no-roundtrip-in-BytesType.txt, v6-0002-BytesType.fromString-expects-a-hex-string.txt, v6-0003-compose-method-for-AbstractTypes.txt, v6-0004-assume-utf8-in-CliTest-keys-dammit.txt, v6-0005-AbstractType.fromsString-throws-MarshalException.txt, v6-0006-expand-fromString-parsing-of-TimeUUIDType.txt, v6-0007-catch-MarshallException-raise-RuntimeException.txt, v6-0008-unit-test-for-TimeUUIDType.fromString.t
 xt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Presently, {{o.a.c.cql.Term.getByteBuffer}} manage's the conversion from a parsed term to a {{ByteBuffer}} of the right contents, this should be moved into the individual {{AbstractType}} subclasses (aka {{AbstractType.fromString}}).
> Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that {{AbstractType.getString(AbstractType.fromString(s)) == s}}
> Finally, for use in results decoding a method should exist that given a {{ByteBuffer}} will return the appropriate object for that type.  For example, {{IntegerType.compose(ByteBuffer) -> java.math.BigInteger}}, or {{LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira