Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
2.1.x, 2.2.17, 3.11.7, 4.0-alpha4, 4.0
-
Code - Bug - Unclear Impact
-
Low
-
Normal
-
User Report
-
All
-
None
-
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!