cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremiah Jordan (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-5610) ORDER BY desc breaks cqlsh COPY
Date Mon, 03 Jun 2013 20:42:20 GMT
Jeremiah Jordan created CASSANDRA-5610:

             Summary: ORDER BY desc breaks cqlsh COPY
                 Key: CASSANDRA-5610
             Project: Cassandra
          Issue Type: Bug
          Components: Tools
            Reporter: Jeremiah Jordan
            Assignee: Aleksey Yeschenko
            Priority: Minor

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.

    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)
                    rowmap[name] = value
                rowmap[name] = 'null'
        return self.do_import_insert(layout, rowmap)

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:

View raw message