cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9083) cqlsh COPY functionality doesn't work together with SOURCE or with cqlsh -f
Date Fri, 29 May 2015 18:11:17 GMT

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

Tyler Hobbs commented on CASSANDRA-9083:
----------------------------------------

To avoid trying to catch every place where we perform a unicode-incompatible operation on
a token, I decided to convert all tokens to ascii strings where possible.  If there are unicode
characters in the string, the token will be left as a {{unicode}} object.  The lexer shouldn't
match unicode characters for any of the tokens we manipulate, so this should be safe.

Branch: https://github.com/thobbs/cassandra/tree/CASSANDRA-9083
New dtest: https://github.com/thobbs/cassandra-dtest/tree/CASSANDRA-9083
cassci tests (currently pending): [dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-9083-dtest/],
[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-9083-testall/]

> cqlsh COPY functionality doesn't work together with SOURCE or with cqlsh -f
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9083
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9083
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: 2.1.3
>            Reporter: Joseph Chu
>            Assignee: Tyler Hobbs
>            Priority: Minor
>              Labels: cqlsh
>             Fix For: 2.1.x, 2.2.x
>
>
> Executing a COPY command from an external file using the cqlsh -f or the SOURCE command
results in the error:
> filename.cql:7:descriptor 'lower' requires a 'str' object but received a 'unicode'
> Looks like there was a change in the cqlsh code from 2.1.2 to 2.1.3 which makes use of
codecs.open() instead of open(), which returns a unicode object. 
> The offending line of code that returns the error seems to be in cqlsh, line 1415:
> copyoptnames = map(str.lower, parsed.get_binding('optnames', ()))



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

Mime
View raw message