Fix ParseError unhashable type list in cqlsh copy from

patch by Stefania Alborghetti; reviewed by Alex Petrov for CASSANDRA-13364


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/010b5f3a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/010b5f3a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/010b5f3a

Branch: refs/heads/cassandra-3.11
Commit: 010b5f3a567663a5ceb823932a0b430848d331e3
Parents: d718d42
Author: Stefania Alborghetti <stefania.alborghe...@datastax.com>
Authored: Wed Mar 29 11:22:08 2017 +0800
Committer: Stefania Alborghetti <stefania.alborghe...@datastax.com>
Committed: Fri Apr 7 08:57:54 2017 +0800

----------------------------------------------------------------------
 CHANGES.txt                | 1 +
 pylib/cqlshlib/copyutil.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/010b5f3a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 111f3de..31c7b8a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.18
+ * Fix ParseError unhashable type list in cqlsh copy from (CASSANDRA-13364)
  * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
  * Remove unused repositories (CASSANDRA-13278)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/010b5f3a/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index 5565fed..3a45353 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -1832,7 +1832,7 @@ class ImportConversion(object):
             return tuple(convert_mandatory(t, v) for t, v in zip(ct.subtypes, 
split(val)))
 
         def convert_list(val, ct=cql_type):
-            return list(convert_mandatory(ct.subtypes[0], v) for v in 
split(val))
+            return tuple(convert_mandatory(ct.subtypes[0], v) for v in 
split(val))
 
         def convert_set(val, ct=cql_type):
             return frozenset(convert_mandatory(ct.subtypes[0], v) for v in 
split(val))

Reply via email to