You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "paul cannon (Created) (JIRA)" <ji...@apache.org> on 2012/04/19 21:16:40 UTC

[jira] [Created] (CASSANDRA-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

cqlsh: in cql3 mode, use cql3 quoting when outputting cql
---------------------------------------------------------

                 Key: CASSANDRA-4173
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
             Project: Cassandra
          Issue Type: Improvement
          Components: Tools
    Affects Versions: 1.1.0
            Reporter: paul cannon
            Assignee: paul cannon
            Priority: Minor


when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,

{noformat}
cqlsh:foo> describe columnfamily bar
CREATE COLUMNFAMILY bar (
  a int PRIMARY KEY,
  'b c' text
) WITH
...
{noformat}

cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

--
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-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

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

paul cannon updated CASSANDRA-4173:
-----------------------------------

    Attachment: 4173-3.patch.txt

Rebased again on top of cassandra-1.1; I think I mucked something up with the last one. Wouldn't apply cleanly.

Github branch updated too. New tag:

https://github.com/thepaul/cassandra/tree/pending/4173-3
                
> cqlsh: in cql3 mode, use cql3 quoting when outputting cql
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.1.0
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql3, cqlsh
>             Fix For: 1.1.1
>
>         Attachments: 4173-3.patch.txt
>
>
> when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,
> {noformat}
> cqlsh:foo> describe columnfamily bar
> CREATE COLUMNFAMILY bar (
>   a int PRIMARY KEY,
>   'b c' text
> ) WITH
> ...
> {noformat}
> cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

--
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-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

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

Jonathan Ellis updated CASSANDRA-4173:
--------------------------------------

    Reviewer: brandon.williams
    
> cqlsh: in cql3 mode, use cql3 quoting when outputting cql
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.1.0
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql3, cqlsh
>             Fix For: 1.1.1
>
>         Attachments: 4173.patch.txt
>
>
> when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,
> {noformat}
> cqlsh:foo> describe columnfamily bar
> CREATE COLUMNFAMILY bar (
>   a int PRIMARY KEY,
>   'b c' text
> ) WITH
> ...
> {noformat}
> cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

--
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-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

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

paul cannon updated CASSANDRA-4173:
-----------------------------------

    Attachment: 4173.patch.txt

break out calls to cql_escape so that they're separated by the sort of thing being quoted (column/cf/keyspace name vs. value) and go through the Shell object, so it can route to cql3 quoting or cql2 quoting as appropriate.

This should fix all uses of quoting except in tab completion areas.

Fix attached here and in the 4173 branch in my github, tagged here:

https://github.com/thepaul/cassandra/tree/pending/4173

The patch is meant to go on top of 4164.patch.txt from CASSANDRA-4164.
                
> cqlsh: in cql3 mode, use cql3 quoting when outputting cql
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.1.0
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql3, cqlsh
>             Fix For: 1.1.1
>
>         Attachments: 4173.patch.txt
>
>
> when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,
> {noformat}
> cqlsh:foo> describe columnfamily bar
> CREATE COLUMNFAMILY bar (
>   a int PRIMARY KEY,
>   'b c' text
> ) WITH
> ...
> {noformat}
> cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

--
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-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

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

paul cannon updated CASSANDRA-4173:
-----------------------------------

    Attachment:     (was: 4173-2.patch.txt)
    
> cqlsh: in cql3 mode, use cql3 quoting when outputting cql
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.1.0
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql3, cqlsh
>             Fix For: 1.1.1
>
>         Attachments: 4173-3.patch.txt
>
>
> when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,
> {noformat}
> cqlsh:foo> describe columnfamily bar
> CREATE COLUMNFAMILY bar (
>   a int PRIMARY KEY,
>   'b c' text
> ) WITH
> ...
> {noformat}
> cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

--
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-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

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

paul cannon commented on CASSANDRA-4173:
----------------------------------------

No, it doesn't. Definitely that would have been easier.
                
> cqlsh: in cql3 mode, use cql3 quoting when outputting cql
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.1.0
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql3, cqlsh
>
> when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,
> {noformat}
> cqlsh:foo> describe columnfamily bar
> CREATE COLUMNFAMILY bar (
>   a int PRIMARY KEY,
>   'b c' text
> ) WITH
> ...
> {noformat}
> cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

--
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-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

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

paul cannon updated CASSANDRA-4173:
-----------------------------------

    Attachment:     (was: 4173.patch.txt)
    
> cqlsh: in cql3 mode, use cql3 quoting when outputting cql
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.1.0
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql3, cqlsh
>             Fix For: 1.1.1
>
>         Attachments: 4173-3.patch.txt
>
>
> when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,
> {noformat}
> cqlsh:foo> describe columnfamily bar
> CREATE COLUMNFAMILY bar (
>   a int PRIMARY KEY,
>   'b c' text
> ) WITH
> ...
> {noformat}
> cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

--
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-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

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

paul cannon commented on CASSANDRA-4173:
----------------------------------------

Updating patch against new 4164.patch-2.txt from CASSANDRA-4164.
                
> cqlsh: in cql3 mode, use cql3 quoting when outputting cql
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.1.0
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql3, cqlsh
>             Fix For: 1.1.1
>
>         Attachments: 4173.patch.txt
>
>
> when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,
> {noformat}
> cqlsh:foo> describe columnfamily bar
> CREATE COLUMNFAMILY bar (
>   a int PRIMARY KEY,
>   'b c' text
> ) WITH
> ...
> {noformat}
> cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

--
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-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

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

Jonathan Ellis commented on CASSANDRA-4173:
-------------------------------------------

Does CQL2 support double quotes?  If so, switching to doublequotes everywhere may be simpler.
                
> cqlsh: in cql3 mode, use cql3 quoting when outputting cql
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.1.0
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql3, cqlsh
>
> when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,
> {noformat}
> cqlsh:foo> describe columnfamily bar
> CREATE COLUMNFAMILY bar (
>   a int PRIMARY KEY,
>   'b c' text
> ) WITH
> ...
> {noformat}
> cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

--
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-4173) cqlsh: in cql3 mode, use cql3 quoting when outputting cql

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

paul cannon updated CASSANDRA-4173:
-----------------------------------

    Attachment: 4173-2.patch.txt

New patch attached, github branch rebased, new tag at:

https://github.com/thepaul/cassandra/tree/pending/4173-2
                
> cqlsh: in cql3 mode, use cql3 quoting when outputting cql
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4173
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.1.0
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql3, cqlsh
>             Fix For: 1.1.1
>
>         Attachments: 4173-2.patch.txt, 4173.patch.txt
>
>
> when cqlsh needs to output a column name or other term which needs quoting (say, if you run DESCRIBE KEYSPACE and some column name has a space in it), it currently only knows how to quote in the cql2 way. That is,
> {noformat}
> cqlsh:foo> describe columnfamily bar
> CREATE COLUMNFAMILY bar (
>   a int PRIMARY KEY,
>   'b c' text
> ) WITH
> ...
> {noformat}
> cql3 does not recognize single quotes around column names, or columnfamily or keyspace names either. cqlsh ought to learn how to use double-quotes instead when in cql3 mode.

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