Anybody Know Anything About These Types #97

Closed
nberardi opened this Issue Jan 3, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@nberardi
Contributor

nberardi commented Jan 3, 2013

I like to maintain a pretty complete list of types in FluentCassandra, but I have to admit I know nothing about the following types:

If anybody is interested in cutting their teeth on the FluentCassandra type system, the EmptyType seems like it would be relatively easy to implement. Given that it just produces an empty byte array.

@nberardi nberardi referenced this issue Jan 3, 2013

Closed

Handling CQL3 collections #96

0 of 3 tasks complete

@ghost ghost assigned nberardi Jan 3, 2013

@eplowe

This comment has been minimized.

Show comment Hide comment
@eplowe

eplowe Jan 4, 2013

Contributor

LocalByPartitionerType - http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cassandra/cassandra-all/1.2.0->beta1/org/apache/cassandra/db/marshal/LocalByPartionerType.java?av=f

According to the comments in the class:

for sorting columns representing row keys in the row ordering as determined by a partitioner. Not intended for user-defined CFs, and will in fact error out if used with such.

EmptyType and ColumnToCollectionType can technically be defined, even though they aren't referenced on the cql_data_types documentation page. e.g.:

ALTER TABLE table ADD empty_col 'EmptyType';
ALTER TABLE table ADD col_test 'ColumnToCollectionType';

And based on peaking around the code, it seems ColumnToCollectionType is used internally to map a column to its proper collection type (map, list, set). But please take this with a grain of salt as I may have missed something.

This leaves InetAddressType -- you can define a column as 'inet' and according to: http://www.datastax.com/docs/1.2/cql_cli/cql_data_types

_inet IP address string in xxx.xxx.xxx.xxx form. See 1).

  1. Used by python-cql driver and binary protocols._

I would say it makes sense to implement InetAddressType as it is actually a CQL data type that is listed for use. Just my 2 cents.

Contributor

eplowe commented Jan 4, 2013

LocalByPartitionerType - http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cassandra/cassandra-all/1.2.0->beta1/org/apache/cassandra/db/marshal/LocalByPartionerType.java?av=f

According to the comments in the class:

for sorting columns representing row keys in the row ordering as determined by a partitioner. Not intended for user-defined CFs, and will in fact error out if used with such.

EmptyType and ColumnToCollectionType can technically be defined, even though they aren't referenced on the cql_data_types documentation page. e.g.:

ALTER TABLE table ADD empty_col 'EmptyType';
ALTER TABLE table ADD col_test 'ColumnToCollectionType';

And based on peaking around the code, it seems ColumnToCollectionType is used internally to map a column to its proper collection type (map, list, set). But please take this with a grain of salt as I may have missed something.

This leaves InetAddressType -- you can define a column as 'inet' and according to: http://www.datastax.com/docs/1.2/cql_cli/cql_data_types

_inet IP address string in xxx.xxx.xxx.xxx form. See 1).

  1. Used by python-cql driver and binary protocols._

I would say it makes sense to implement InetAddressType as it is actually a CQL data type that is listed for use. Just my 2 cents.

@nberardi

This comment has been minimized.

Show comment Hide comment
@nberardi

nberardi Jan 4, 2013

Contributor

I would say EmptyType and InetAddressType are ones we are going to want to implement. I have a feeling that EmptyType has a use in the CompositeType.

Contributor

nberardi commented Jan 4, 2013

I would say EmptyType and InetAddressType are ones we are going to want to implement. I have a feeling that EmptyType has a use in the CompositeType.

nberardi added a commit that referenced this issue Jan 7, 2013

nberardi added a commit that referenced this issue Jan 7, 2013

@nberardi

This comment has been minimized.

Show comment Hide comment
@nberardi

nberardi Jan 7, 2013

Contributor

Added the two types I was concerned about.

Contributor

nberardi commented Jan 7, 2013

Added the two types I was concerned about.

@nberardi nberardi closed this Jan 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment