You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Tyler Hobbs (Created) (JIRA)" <ji...@apache.org> on 2012/01/10 23:30:41 UTC
[jira] [Created] (CASSANDRA-3724) CompositeType doesn't check
number of components when validating
CompositeType doesn't check number of components when validating
----------------------------------------------------------------
Key: CASSANDRA-3724
URL: https://issues.apache.org/jira/browse/CASSANDRA-3724
Project: Cassandra
Issue Type: Bug
Components: Core
Reporter: Tyler Hobbs
Priority: Minor
In {{AbstractCompositeType.validate()}}, there isn't any kind of check to verify that the data has the same number of components as the comparator (or validator). This means that if you say the comparator is {{CompositeType(UTF8Type, UTF8Type)}}, you can use column names that only have the first component (ie, the last thing in the bytestring is the eof for the first component).
This behavior isn't explicitly stated anywhere. Personally, I wouldn't expect this to validate, but I could see an argument for why it should. Either way, we need to either check the number of components or explicitly state that this is expected behavior.
--
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
[jira] [Resolved] (CASSANDRA-3724) CompositeType doesn't check
number of components when validating
Posted by "Jonathan Ellis (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-3724.
---------------------------------------
Resolution: Not A Problem
This is a feature. (See also CASSANDRA-3657.)
> CompositeType doesn't check number of components when validating
> ----------------------------------------------------------------
>
> Key: CASSANDRA-3724
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3724
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Tyler Hobbs
> Priority: Minor
>
> In {{AbstractCompositeType.validate()}}, there isn't any kind of check to verify that the data has the same number of components as the comparator (or validator). This means that if you say the comparator is {{CompositeType(UTF8Type, UTF8Type)}}, you can use column names that only have the first component (ie, the last thing in the bytestring is the eof for the first component).
> This behavior isn't explicitly stated anywhere. Personally, I wouldn't expect this to validate, but I could see an argument for why it should. Either way, we need to either check the number of components or explicitly state that this is expected behavior.
--
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
[jira] [Commented] (CASSANDRA-3724) CompositeType doesn't check
number of components when validating
Posted by "Russell Bradberry (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183657#comment-13183657 ]
Russell Bradberry commented on CASSANDRA-3724:
----------------------------------------------
as long as there isn't any performance implications, I would tend to think that this should be expected behavior. There could possibly be a scenario in which a user wants to differentiate between a column with only one component and a column with a zero length string as the second component
> CompositeType doesn't check number of components when validating
> ----------------------------------------------------------------
>
> Key: CASSANDRA-3724
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3724
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Tyler Hobbs
> Priority: Minor
>
> In {{AbstractCompositeType.validate()}}, there isn't any kind of check to verify that the data has the same number of components as the comparator (or validator). This means that if you say the comparator is {{CompositeType(UTF8Type, UTF8Type)}}, you can use column names that only have the first component (ie, the last thing in the bytestring is the eof for the first component).
> This behavior isn't explicitly stated anywhere. Personally, I wouldn't expect this to validate, but I could see an argument for why it should. Either way, we need to either check the number of components or explicitly state that this is expected behavior.
--
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