Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-5610

ORDER BY desc breaks cqlsh COPY

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 1.2.6
    • Component/s: Legacy/Tools
    • Labels:
    • Severity:
      Low

      Description

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

        Attachments

        1. 5610.txt
          0.8 kB
          Aleksey Yeschenko

          Activity

            People

            • Assignee:
              aleksey Aleksey Yeschenko
              Reporter:
              jjordan Jeremiah Jordan
              Authors:
              Aleksey Yeschenko
              Reviewers:
              Brandon Williams
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: