[ https://issues.apache.org/jira/browse/CASSANDRA-11354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15195672#comment-15195672 ]
Benjamin Lerer commented on CASSANDRA-11354: -------------------------------------------- |[trunk|https://github.com/apache/cassandra/compare/trunk...blerer:11354-trunk]|[utest|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11354-trunk-testall/3/]|[dtest|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11354-trunk-dtest/2/]| The patch modify the restriction hierachy. The {{Restriction}} interfact has now 2 children {{SingleRestriction}} and {{Restrictions}}. {{SingleRestriction}} is the parent interface for {{SingleColumnRestriction}} and {{MultiColumnsRestriction}}. {{Restrictions}} is the parent interface for {{RestrictionSet}}, {{PartitionKeyRestrictions}} and {{ClusteringColumnRestrictions}}. The code specific to the partition key restrictions is encapsulated in the sub-classes of {{PartitionKeyRestrictions}}. The code specific to the clustering column restriction is encapsulated in {{ClusteringColumnRestrictions}}. The {{isEQ}}, {{isIN}}, {{isSlice}} and {{isContains}} for the sub-classes of {{Restrictions}} have been replaced by the {{hasIN}}, {{hasSlice}}, {{hasContains}} and {{hasOnlyEqualityRestrictions()}}. > PrimaryKeyRestrictionSet should be refactored > --------------------------------------------- > > Key: CASSANDRA-11354 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11354 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Reporter: Benjamin Lerer > Assignee: Benjamin Lerer > > While reviewing CASSANDRA-11310 I realized that the code of > {{PrimaryKeyRestrictionSet}} was really confusing. > The main 2 issues are: > * the fact that it is used for partition keys and clustering columns > restrictions whereas those types of column required different processing > * the {{isEQ}}, {{isSlice}}, {{isIN}} and {{isContains}} methods should not > be there as the set of restrictions might not match any of those categories > when secondary indexes are used. -- This message was sent by Atlassian JIRA (v6.3.4#6332)