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/03/26 21:58:31 UTC

[jira] [Created] (CASSANDRA-4084) Better validator support for composite comparator CFs

Better validator support for composite comparator CFs
-----------------------------------------------------

                 Key: CASSANDRA-4084
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4084
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
            Reporter: Tyler Hobbs


Perhaps this should be part of replacing super columns with composites, but we essentially need something analogous to sub-column validators for when composites are used in a way that's similar to super columns (multiple fields for each "super column" in a row).  As an example use case, suppose you have a wide row holding users where the comparator is (<user_id>, <field>), and <field> might be either "name" or "age"; ideally, you can validate "name" as UT8Type and "age" as IntegerType.

Allowing wildcards to be used for components in the column name portion of the ColumnDef might be a reasonable approach.

--
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-4084) Better validator support for composite comparator CFs

Posted by "Tyler Hobbs (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239534#comment-13239534 ] 

Tyler Hobbs commented on CASSANDRA-4084:
----------------------------------------

I'm suggesting that we need to support column value validators based on only one or more components of the composite name rather than all of the components.  In the example I gave, there will be many different values of <user_id>, but if the last component is "birthdate", you always want to validate that the column value is an integer.

This did seem like something that would be important for CQL, but I couldn't find another ticket covering this, and it seemed like something that might be missed.
                
> Better validator support for composite comparator CFs
> -----------------------------------------------------
>
>                 Key: CASSANDRA-4084
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4084
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tyler Hobbs
>            Priority: Minor
>
> Perhaps this should be part of replacing super columns with composites, but we essentially need something analogous to sub-column validators for when composites are used in a way that's similar to super columns (multiple fields for each "super column" in a row).  As an example use case, suppose you have a wide row holding users where the comparator is (<user_id>, <field>), and <field> might be either "name" or "age"; ideally, you can validate "name" as UT8Type and "age" as IntegerType.
> Allowing wildcards to be used for components in the column name portion of the ColumnDef might be a reasonable approach.

--
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-4084) Better validator support for composite comparator CFs

Posted by "Tyler Hobbs (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239878#comment-13239878 ] 

Tyler Hobbs commented on CASSANDRA-4084:
----------------------------------------

After looking things over and getting Sylvain to explain it to me, I think I understand.  The behavior in 1.1 is, when using a composite comparator, to apply the column validator to any column where the last component of the column name matches the 'name' field of the ColumnDef.
                
> Better validator support for composite comparator CFs
> -----------------------------------------------------
>
>                 Key: CASSANDRA-4084
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4084
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tyler Hobbs
>            Priority: Minor
>
> Perhaps this should be part of replacing super columns with composites, but we essentially need something analogous to sub-column validators for when composites are used in a way that's similar to super columns (multiple fields for each "super column" in a row).  As an example use case, suppose you have a wide row holding users where the comparator is (<user_id>, <field>), and <field> might be either "name" or "age"; ideally, you can validate "name" as UT8Type and "age" as IntegerType.
> Allowing wildcards to be used for components in the column name portion of the ColumnDef might be a reasonable approach.

--
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-4084) Better validator support for composite comparator CFs

Posted by "Tyler Hobbs (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tyler Hobbs resolved CASSANDRA-4084.
------------------------------------

    Resolution: Duplicate

Duplicates CASSANDRA-3761.
                
> Better validator support for composite comparator CFs
> -----------------------------------------------------
>
>                 Key: CASSANDRA-4084
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4084
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tyler Hobbs
>            Priority: Minor
>
> Perhaps this should be part of replacing super columns with composites, but we essentially need something analogous to sub-column validators for when composites are used in a way that's similar to super columns (multiple fields for each "super column" in a row).  As an example use case, suppose you have a wide row holding users where the comparator is (<user_id>, <field>), and <field> might be either "name" or "age"; ideally, you can validate "name" as UT8Type and "age" as IntegerType.
> Allowing wildcards to be used for components in the column name portion of the ColumnDef might be a reasonable approach.

--
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-4084) Better validator support for composite comparator CFs

Posted by "Sylvain Lebresne (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239611#comment-13239611 ] 

Sylvain Lebresne commented on CASSANDRA-4084:
---------------------------------------------

Sorry, there is some confusion. What I've described in my preceding comment works *today*. It was introduced as part of CASSANDRA-2474. And yes, this ends up setting ColumnDef under the hood but the point is that this is way more human readable. What I am saying is that as far as I can tell, everything you've described so far in that ticket is already handled. At least the 'multiple fields for each "super column" in a row' case is definitively already handled by CQL3.
                
> Better validator support for composite comparator CFs
> -----------------------------------------------------
>
>                 Key: CASSANDRA-4084
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4084
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tyler Hobbs
>            Priority: Minor
>
> Perhaps this should be part of replacing super columns with composites, but we essentially need something analogous to sub-column validators for when composites are used in a way that's similar to super columns (multiple fields for each "super column" in a row).  As an example use case, suppose you have a wide row holding users where the comparator is (<user_id>, <field>), and <field> might be either "name" or "age"; ideally, you can validate "name" as UT8Type and "age" as IntegerType.
> Allowing wildcards to be used for components in the column name portion of the ColumnDef might be a reasonable approach.

--
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-4084) Better validator support for composite comparator CFs

Posted by "Sylvain Lebresne (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239295#comment-13239295 ] 

Sylvain Lebresne commented on CASSANDRA-4084:
---------------------------------------------

This is already supported by CQL3 I believe, unless I'm not understanding this correctly (I did not understood what wildcard had to do with validators though so maybe I did misunderstood the idea).
                
> Better validator support for composite comparator CFs
> -----------------------------------------------------
>
>                 Key: CASSANDRA-4084
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4084
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tyler Hobbs
>            Priority: Minor
>
> Perhaps this should be part of replacing super columns with composites, but we essentially need something analogous to sub-column validators for when composites are used in a way that's similar to super columns (multiple fields for each "super column" in a row).  As an example use case, suppose you have a wide row holding users where the comparator is (<user_id>, <field>), and <field> might be either "name" or "age"; ideally, you can validate "name" as UT8Type and "age" as IntegerType.
> Allowing wildcards to be used for components in the column name portion of the ColumnDef might be a reasonable approach.

--
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-4084) Better validator support for composite comparator CFs

Posted by "Tyler Hobbs (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239572#comment-13239572 ] 

Tyler Hobbs commented on CASSANDRA-4084:
----------------------------------------

Ah, you're referring to CASSANDRA-3680?  It seems like that would necessitate support for what I'm describing here.  If we can make sure the underlying mechanism is exposed in a general way (settable with a ColumnDef or something) in that ticket, then I'm fine with marking this as a duplicate.  Otherwise, this ticket should probably remain open and depend on that ticket.
                
> Better validator support for composite comparator CFs
> -----------------------------------------------------
>
>                 Key: CASSANDRA-4084
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4084
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tyler Hobbs
>            Priority: Minor
>
> Perhaps this should be part of replacing super columns with composites, but we essentially need something analogous to sub-column validators for when composites are used in a way that's similar to super columns (multiple fields for each "super column" in a row).  As an example use case, suppose you have a wide row holding users where the comparator is (<user_id>, <field>), and <field> might be either "name" or "age"; ideally, you can validate "name" as UT8Type and "age" as IntegerType.
> Allowing wildcards to be used for components in the column name portion of the ColumnDef might be a reasonable approach.

--
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] [Updated] (CASSANDRA-4084) Better validator support for composite comparator CFs

Posted by "Tyler Hobbs (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tyler Hobbs updated CASSANDRA-4084:
-----------------------------------

    Priority: Minor  (was: Major)
    
> Better validator support for composite comparator CFs
> -----------------------------------------------------
>
>                 Key: CASSANDRA-4084
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4084
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tyler Hobbs
>            Priority: Minor
>
> Perhaps this should be part of replacing super columns with composites, but we essentially need something analogous to sub-column validators for when composites are used in a way that's similar to super columns (multiple fields for each "super column" in a row).  As an example use case, suppose you have a wide row holding users where the comparator is (<user_id>, <field>), and <field> might be either "name" or "age"; ideally, you can validate "name" as UT8Type and "age" as IntegerType.
> Allowing wildcards to be used for components in the column name portion of the ColumnDef might be a reasonable approach.

--
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-4084) Better validator support for composite comparator CFs

Posted by "Sylvain Lebresne (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239557#comment-13239557 ] 

Sylvain Lebresne commented on CASSANDRA-4084:
---------------------------------------------

So, in CQL3 you can declare:
{noformat}
CREATE TABLE someTable (
  row_key int,
  user_id uuid,
  name text,
  age int
  PRIMARY KEY(row_key, user_id)
)
{noformat}
This will be stored exactly as in your example. In other words, a given user will be internally stored as 2 columns:
{noformat}
row key |           column name     | column value
--------|---------------------------|-------------
   42   | ab332-daf2-00133-331:name |     tom
   42   | ab332-daf2-00133-331:age  |      33 
{noformat}
                
> Better validator support for composite comparator CFs
> -----------------------------------------------------
>
>                 Key: CASSANDRA-4084
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4084
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tyler Hobbs
>            Priority: Minor
>
> Perhaps this should be part of replacing super columns with composites, but we essentially need something analogous to sub-column validators for when composites are used in a way that's similar to super columns (multiple fields for each "super column" in a row).  As an example use case, suppose you have a wide row holding users where the comparator is (<user_id>, <field>), and <field> might be either "name" or "age"; ideally, you can validate "name" as UT8Type and "age" as IntegerType.
> Allowing wildcards to be used for components in the column name portion of the ColumnDef might be a reasonable approach.

--
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