You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2013/06/03 23:56:21 UTC

[jira] [Updated] (CASSANDRA-5610) ORDER BY desc breaks cqlsh COPY

     [ https://issues.apache.org/jira/browse/CASSANDRA-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-5610:
-----------------------------------------

    Attachment: 5610.txt
    
> ORDER BY desc breaks cqlsh COPY
> -------------------------------
>
>                 Key: CASSANDRA-5610
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5610
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Jeremiah Jordan
>            Assignee: Aleksey Yeschenko
>            Priority: Minor
>         Attachments: 5610.txt
>
>
> If you have a reversed text field, COPY chokes on it because the type is
> "'org.apache.cassandra.db.marshal.ReversedType'<text>" not just 'text' so the strings don't get quoted in the generated CQL.
> {noformat}
>     def do_import_row(self, columns, nullval, layout, row):
>         rowmap = {}
>         for name, value in zip(columns, row):
>             if value != nullval:
>                 type = layout.get_column(name).cqltype.cql_parameterized_type()
>                 if type in ('ascii', 'text', 'timestamp', 'inet'):
>                     rowmap[name] = self.cql_protect_value(value)
>                 else:
>                     rowmap[name] = value
>             else:
>                 rowmap[name] = 'null'
>         return self.do_import_insert(layout, rowmap)
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira