[ https://issues.apache.org/jira/browse/CASSANDRA-3647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405794#comment-13405794 ]
Sylvain Lebresne commented on CASSANDRA-3647: --------------------------------------------- I've pushed a v3 at https://github.com/pcmanus/cassandra/commits/3647-3 that is rebased and adds one last patch to address some of the remarks. More precisely: bq. Wouldn't it be a good idea to add a "boolean isCollectionType()" method which by default would return "false"? I don't know actually. That's definitively an option but on the other side I wonder what that would really get us. I know instanceof has bad reputation, and I certainly agree that we shouldn't overuse it, but I don't think we should avoid it at all cost either. In most instanceof usage for CollectionType and CompositeType, a cast follows (and in most case I don't see how to refactor to avoid those casts without being uber ugly, though I'm open to suggestion), and if your going to cast, I think testing with instanceof is actually safer than using a boolean method. bq. when to append(',') could be distinguished with a condition instead of code duplication Changed. {quote} * *Value* I think we should add a way to distinguish between different types of values without using "instanceof" all them * *UpdateStatement* starting from line 199 - only difference between "instanceof" cases is pre-validation which could be added to the separate method in Value {quote} If I understand correctly those are related. I've refactored Value.java and UpdateStatement a bit to merge the code dealing with the different literals. It does not eliminate *all* the instanceof and casts, but I think the remaining one are ok (that is, I don't see a clearly better way to do the same thing without the instanceof). bq. *UpdateStatement* "mutationForKey" method - do we need to enforce using "group" as a last parameter all the time, even when we set it to "null" ? I don't understand what you are suggesting. bq. "definition" should be "definitions" Fixed. bq. *CollectionType* line 89 *ListType* line 147 "argument" should be "arguments" I didn't found any instance of "argument" on those line. Maybe they were in the first patches but removed by the later ones? > Support set and map value types in CQL > -------------------------------------- > > Key: CASSANDRA-3647 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3647 > Project: Cassandra > Issue Type: New Feature > Components: API, Core > Reporter: Jonathan Ellis > Assignee: Sylvain Lebresne > Labels: cql > Fix For: 1.2 > > > Composite columns introduce the ability to have arbitrarily nested data in a > Cassandra row. We should expose this through CQL. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira