You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Edward Capriolo (JIRA)" <ji...@apache.org> on 2011/09/02 21:11:12 UTC

[jira] [Created] (CASSANDRA-3130) CQL queries should alow talbe names to be qualified by keyspace

CQL queries should alow talbe names to be qualified by keyspace
---------------------------------------------------------------

                 Key: CASSANDRA-3130
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
             Project: Cassandra
          Issue Type: New Feature
            Reporter: Edward Capriolo


While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.

The following command sequence is three RPC operations.
{noformat}
select * from cf;
use otherkeyspace;
select * from othercf;
{noformat}

CQL should allow us to do:
{noformat}
select * from keyspace1.cf;
select * from keyspace2.cf;
{noformat}

This will make the connection pool management on the client much easier.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Edward Capriolo commented on CASSANDRA-3130:
--------------------------------------------

These feature is present in every major database I have worked with. People often join across databases or query data in one to save the results in another.
{noformat}
USE db1;
SELECT author_name,editor_name FROM author,db2.editor
  WHERE author.editor_id = db2.editor.editor_id;
{noformat}
http://dev.mysql.com/doc/refman/5.0/en/use.html



> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Priority: Minor
>             Fix For: 1.1
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Jonathan Ellis commented on CASSANDRA-3130:
-------------------------------------------

IMO the "right" fix is to make things like hasColumnFamilyAccess take a keyspace parameter (maybe just as an overload to keep the common case simple)
                
> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.0.1
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
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-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Eric Evans commented on CASSANDRA-3130:
---------------------------------------

I disagree, all of the Good reasons for making that change to the RPC back then, hold true today whether you're talking about RPC or CQL.

The "keyspace" is equivalent to "database" in other systems that use SQL, it's the application-specific namespace.  In which of these systems are you able to qualify a table with the database name like this?

> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Priority: Minor
>             Fix For: 1.1
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Jonathan Ellis updated CASSANDRA-3130:
--------------------------------------

         Priority: Minor  (was: Major)
    Fix Version/s: 1.1

> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Priority: Minor
>             Fix For: 1.1
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Pavel Yaskevich updated CASSANDRA-3130:
---------------------------------------

    Attachment: CASSANDRA-3130.patch

I have overcomplicated things... This is the version that uses ClientState.hasColumnFamilyAccess with additional keyspace parameter.
                
> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.0.1
>
>         Attachments: CASSANDRA-3130.patch
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
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-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Pavel Yaskevich updated CASSANDRA-3130:
---------------------------------------

    Attachment:     (was: CASSANDRA-3130.patch)
    
> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.0.1
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
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-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Jonathan Ellis commented on CASSANDRA-3130:
-------------------------------------------

One more simplification: we could add a getRawKeyspace method to clientState that doesn't throw InvalidRequest.  +1 otherwise.
                
> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.0.1
>
>         Attachments: CASSANDRA-3130.patch
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
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-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Eric Evans commented on CASSANDRA-3130:
---------------------------------------

I was going to cite Postgres's docs (i.e. "Any given client connection to the server can access only the data in a single database, the one specified in the connection request."), but then realized that with schemas (http://www.postgresql.org/docs/9.0/static/ddl-schemas.html), the same capability is there.

So, I stand corrected.

> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Priority: Minor
>             Fix For: 1.1
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Pavel Yaskevich commented on CASSANDRA-3130:
--------------------------------------------

I guess I can clone ClientState to isolate SELECT with set keyspace name.
                
> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.0.1
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
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-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Pavel Yaskevich commented on CASSANDRA-3130:
--------------------------------------------

If we don't - we loose ability to do validations...
                
> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.0.1
>
>         Attachments: CASSANDRA-3130.patch
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
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-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Pavel Yaskevich updated CASSANDRA-3130:
---------------------------------------

    Attachment: CASSANDRA-3130.patch
    
> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.0.1
>
>         Attachments: CASSANDRA-3130.patch
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
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-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Jonathan Ellis commented on CASSANDRA-3130:
-------------------------------------------

I don't think we should update clientState to the queried keyspace -- just use it for the purpose of that one statement.
                
> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.0.1
>
>         Attachments: CASSANDRA-3130.patch
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

--
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] [Assigned] (CASSANDRA-3130) CQL queries should alow talbe names to be qualified by keyspace

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

Jonathan Ellis reassigned CASSANDRA-3130:
-----------------------------------------

    Assignee: Pavel Yaskevich
    
> CQL queries should alow talbe names to be qualified by keyspace
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-3130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3130
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.0.1
>
>
> While the 0.6.X api was "ugly" in terms of method signatures, it did allow you to use the same client to query multiple keyspaces without having to call set_keyspace(String). I totally dislike set_keyspace but I know the thrift API is definitely not changing.
> The following command sequence is three RPC operations.
> {noformat}
> select * from cf;
> use otherkeyspace;
> select * from othercf;
> {noformat}
> CQL should allow us to do:
> {noformat}
> select * from keyspace1.cf;
> select * from keyspace2.cf;
> {noformat}
> This will make the connection pool management on the client much easier.

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