cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7981) Refactor SelectStatement
Date Mon, 17 Nov 2014 09:55:34 GMT

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

Benjamin Lerer commented on CASSANDRA-7981:
-------------------------------------------

I updated the [branch|https://github.com/blerer/cassandra/compare/CASSANDRA-7981].
The patch address most  of the review comments.
{quote}The restriction class hierarchy is confusing, but I don't see an obvious way to simplify
it{quote}
Did not found a way to simplify it but I am also not fully sure about what it is making it
confusing. I probably have worked already too much with it. May be [~slebresne] will have
an idea of how we can improve the things.

{quote}There seems to be a conflict between the {mergeWith(Restriction)} signatures in {{Restriction}}
and {{Restrictions}}.{quote}
It is due to the fact that {{PrimaryKeyRestrictions}} is a composite of {{Restriction}}.

The problem with such a big refactoring is that in the end you lost a part of your ability
to see if the changes that you have made improve really the readability of the code compare
to the original version. 


> Refactor SelectStatement
> ------------------------
>
>                 Key: CASSANDRA-7981
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7981
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>             Fix For: 3.0
>
>
> The current state of the code of SelectStatement make fixing some issues or adding new
functionnalities really hard. It also contains some functionnalities that we would like to
reuse in ModificationStatement but cannot for the moment.
> Ideally I would like to:
> * Perform as much validation as possible on Relations instead of performing it on Restrictions
as it will help for problem like the one of #CASSANDRA-6075 (I believe that by clearly separating
validation and Restrictions building we will also make the code a lot clearer)
> * Provide a way to easily merge restrictions on the same columns as needed for #CASSANDRA-7016
> * Have a preparation logic (validation + pre-processing) that we can easily reuse for
Delete statement #CASSANDRA-6237
> * Make the code much easier to read and safer to modify.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message