You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Gary Dusbabek (JIRA)" <ji...@apache.org> on 2011/03/02 21:54:36 UTC
[jira] Commented: (CASSANDRA-2262) use o.a.c.marshal.*Type for CQL
[ 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