Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better type support #56

Open
edwardcapriolo opened this issue Jan 24, 2013 · 4 comments
Open

Better type support #56

edwardcapriolo opened this issue Jan 24, 2013 · 4 comments

Comments

@edwardcapriolo
Copy link
Collaborator

Look at what they did here to grab cql types...https://github.com/mkjellman/perlcassa

@edwardcapriolo
Copy link
Collaborator Author

StorageService.cfmetadata each column we pull out from Compact Tables if we have it.

@edwardcapriolo
Copy link
Collaborator Author

Currently we are using the type of the object sent to Intravert to derive the byte buffer. In all cases this is not correct.

rm = new RowMutation(ks,IntraService.byteBufferForObject(IntraService.resolveObject(op.getOp().get("rowkey"), req, res, state, i)));

Resolve object should:
Do nothing with ByteBuffer and return it
Wrap byte [] in ByteBuffer and return it
if (object){
if (have assume data on column family){
use the assume data to convert object to byte buffer
return it
} else {
get meta data for object
if ( no meta data){
use a default option string = utf8Type , long = longType, etc
} else {
if (object is convertable to type metadata says){
convert it
return it
} else {
throw exception
}
}
}
}
There are other wrinkles in here for Ref and Object [].

@zznate
Copy link
Owner

zznate commented Feb 9, 2013

Do we have/can we list a set of test criteria for the above? ie. in case x, do y, etc.

Starting with a truth table there will allow us to build a really solid unit test.

@edwardcapriolo
Copy link
Collaborator Author

That is not a bad idea to have one specific unit test. Currently we have different unit test covering this in different ways. The bulk of this is going to be extracting CFMetaData and CQL metadata in a useful way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants