You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by kaspersorensen <gi...@git.apache.org> on 2016/09/19 18:52:35 UTC

[GitHub] metamodel pull request #130: Added primary key lookup optimization for Apach...

GitHub user kaspersorensen opened a pull request:

    https://github.com/apache/metamodel/pull/130

    Added primary key lookup optimization for Apache Cassandra module

    I think the PR title says it all ... I was working a bit with Cassandra and found that it was easy (and really missing) in our connector to add optimized support for primary key lookup queries.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kaspersorensen/metamodel feature/cassandra-improvements

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metamodel/pull/130.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #130
    
----
commit 0fd056f32ae0f6067ef8fec2fcab605536e3f3af
Author: kaspersorensen <i....@gmail.com>
Date:   2016-09-19T18:51:08Z

    Added primary key lookup optimization for Apache Cassandra module

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] metamodel issue #130: Added primary key lookup optimization for Apache Cassa...

Posted by LosD <gi...@git.apache.org>.
Github user LosD commented on the issue:

    https://github.com/apache/metamodel/pull/130
  
    Everything LGTM now, but it would be nice with a review from someone that knows Cassandra.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] metamodel issue #130: Added primary key lookup optimization for Apache Cassa...

Posted by LosD <gi...@git.apache.org>.
Github user LosD commented on the issue:

    https://github.com/apache/metamodel/pull/130
  
    Code LGTM, but I know nothing about Cassandra.
    
    A small worry is the change of a seemingly unrelated test method.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] metamodel pull request #130: Added primary key lookup optimization for Apach...

Posted by kaspersorensen <gi...@git.apache.org>.
Github user kaspersorensen commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/130#discussion_r79616005
  
    --- Diff: cassandra/src/test/java/org/apache/metamodel/cassandra/CassandraDataContextTest.java ---
    @@ -113,7 +114,7 @@ public void testSchemaAndSimpleQuery() throws Exception {
     
         @Test
         public void testWhereColumnEqualsValues() throws Exception {
    -        DataSet ds = dc.query().from(testTableName).select("id").and("title").where("id").isEquals(firstRowId)
    +        DataSet ds = dc.query().from(testTableName).select("id").and("title").where("title").isEquals(firstRowTitle)
    --- End diff --
    
    No but the query no longer represented a "filtered dataset" type query because it got optimized. In fact the new test method is identical to the old test method, except that the assertion of it being a `InMemoryDataSet` is there to show the different paths that the two queries take depending on what column is being filtered on.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] metamodel pull request #130: Added primary key lookup optimization for Apach...

Posted by LosD <gi...@git.apache.org>.
Github user LosD commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/130#discussion_r79471474
  
    --- Diff: cassandra/src/test/java/org/apache/metamodel/cassandra/CassandraDataContextTest.java ---
    @@ -113,7 +114,7 @@ public void testSchemaAndSimpleQuery() throws Exception {
     
         @Test
         public void testWhereColumnEqualsValues() throws Exception {
    -        DataSet ds = dc.query().from(testTableName).select("id").and("title").where("id").isEquals(firstRowId)
    +        DataSet ds = dc.query().from(testTableName).select("id").and("title").where("title").isEquals(firstRowTitle)
    --- End diff --
    
    Was the original test broken by the change?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] metamodel pull request #130: Added primary key lookup optimization for Apach...

Posted by LosD <gi...@git.apache.org>.
Github user LosD commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/130#discussion_r79616989
  
    --- Diff: cassandra/src/test/java/org/apache/metamodel/cassandra/CassandraDataContextTest.java ---
    @@ -113,7 +114,7 @@ public void testSchemaAndSimpleQuery() throws Exception {
     
         @Test
         public void testWhereColumnEqualsValues() throws Exception {
    -        DataSet ds = dc.query().from(testTableName).select("id").and("title").where("id").isEquals(firstRowId)
    +        DataSet ds = dc.query().from(testTableName).select("id").and("title").where("title").isEquals(firstRowTitle)
    --- End diff --
    
    Ahhh yes. Makes sense.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] metamodel pull request #130: Added primary key lookup optimization for Apach...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/metamodel/pull/130


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] metamodel issue #130: Added primary key lookup optimization for Apache Cassa...

Posted by kaspersorensen <gi...@git.apache.org>.
Github user kaspersorensen commented on the issue:

    https://github.com/apache/metamodel/pull/130
  
    Maybe @albertostratio ? :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] metamodel issue #130: Added primary key lookup optimization for Apache Cassa...

Posted by kaspersorensen <gi...@git.apache.org>.
Github user kaspersorensen commented on the issue:

    https://github.com/apache/metamodel/pull/130
  
    OK I am sorry that no one is adding their 10 cents, but given the time it has been for review, I am going to merge (I did test it myself on actual Cassandra databases).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---