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

ORDER BY desc breaks cqlsh COPY

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.6
    • Legacy/Tools
    • 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

            aleksey Aleksey Yeschenko
            jjordan Jeremiah Jordan
            Aleksey Yeschenko
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: