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

cqlsh COPY FROM of map of blobs fails with parse error "unhashable type: 'bytearray'"

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Background

      A user was having issues loading CSV data with the COPY FROM command into a map column with blob values.

      Replication steps

      I can easily replicate the problem with this simple table:

      CREATE TABLE community.blobmaptable (
          id text PRIMARY KEY,
          blobmapcol map<int, blob>
      )
      

      I have this CSV file that contains just 1 row:

      $ cat blobmap.csv 
      c3,{3: 0x74776f}
      

      And here's the error when I try to load it:

      cqlsh:community> COPY blobmaptable (id, blobmapcol) FROM '~/blobmap.csv' ;
      Using 1 child processes
      Starting copy of community.blobmaptable with columns [id, blobmapcol].
      Failed to import 1 rows: ParseError - Failed to parse {3: 0x74776f} : unhashable type: 'bytearray',  given up without retries
      Failed to process 1 rows; failed rows written to import_community_blobmaptable.err
      Processed: 1 rows; Rate:       2 rows/s; Avg. rate:       3 rows/s
      1 rows imported from 1 files in 0.389 seconds (0 skipped).
      

      I've also logged PYTHON-1234 because I wasn't sure if it was a Python driver issue. Cheers!

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Gerrrr Aleksandr Sorokoumov Assign to me
            flightc Erick Ramirez
            Aleksandr Sorokoumov
            Stefania Alborghetti
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h 10m
                3h 10m

                Issue deployment