[ 
https://issues.apache.org/jira/browse/CASSANDRA-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908851#action_12908851
 ] 

Jeremy Hanna commented on CASSANDRA-1480:
-----------------------------------------

I kind of wondered if it would be complicated like that based on how thrift 
handled it.  It's a one line change to fix it in ColumnFamilyRecordReader.  I 
didn't know if it would affect anything else similarly.  Hopefully system/unit 
tests catch a lot of that.  We could do some simple searches in the code for 
null checks I suppose - and in those cases, if they're strings, do a 
o.a.commons.lang.StringUtils.isNotBlank instead.  Not sure if it's worth it 
though since that could have other side effects.

> CFMetaData.convertToThrift makes subcomparator_type empty string instead of 
> null
> --------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1480
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1480
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.7 beta 1
>            Reporter: Jeremy Hanna
>            Assignee: Jon Hermes
>             Fix For: 0.7 beta 2
>
>
> As a result of CASSANDRA-891 adding a CFMetaData.convertToThrift method, the 
> values such as subcomparator_type are defaulted to empty string instead of 
> null.  That makes it so, for example, in ColumnFamilyRecordReader, in its 
> RowIterator, the check for only null is insufficient.  It also needs to check 
> for a blank value.
> After a discussion about it in IRC, Jonathan said it was probably easier to 
> just change the creation to give a null value instead of empty string.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to