[ 
https://issues.apache.org/jira/browse/CASSANDRA-13408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15956175#comment-15956175
 ] 

Stefania edited comment on CASSANDRA-13408 at 4/5/17 2:00 AM:
--------------------------------------------------------------

I could only reproduce this with version 3.8 of the python driver, which 
happened to be installed on my laptop. The bundled version of the python 
driver, 3.7.0.post0-2481531, as well as the latest version, 3.8.1, are fine.

For the records, this is the 
[commit|https://github.com/datastax/python-driver/commit/d96674#diff-afdba094819b7342624f13e92759f1e3R76]
 of the driver that introduced this problem, and this is the 
[commit|https://github.com/datastax/python-driver/commit/3c25965#diff-afdba094819b7342624f13e92759f1e3R83]
 that fixed it.


was (Author: stefania):
I could only reproduce this with the version 3.8 of the python driver, which 
happened to be installed on my laptop. The bundled version of the python 
driver, 3.7.0.post0-2481531, as well as the latest version, 3.8.1, are fine.

For the records, this is the 
[commit|https://github.com/datastax/python-driver/commit/d96674#diff-afdba094819b7342624f13e92759f1e3R76]
 of the driver that introduced this problem, and this is the 
[commit|https://github.com/datastax/python-driver/commit/3c25965#diff-afdba094819b7342624f13e92759f1e3R83]
 that fixed it.

> Cqlsh COPY FROM fails to parse varints
> --------------------------------------
>
>                 Key: CASSANDRA-13408
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13408
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Stefania
>            Assignee: Stefania
>
> CQLSH COPY FROM is failing to import varints. At least for 3.11:
> {code}
> cat test.csv 
> id,varint
> -2147483648,-9223372036854775808
> 2147483647,9223372036854775807
> CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> CREATE TABLE test ( id int PRIMARY KEY , varint varint );
> COPY test FROM 'test.csv' WITH HEADER = TRUE;
> Failed to make batch statement: Received an argument of invalid type for 
> column "varint". Expected: <class 'cassandra.cqltypes.IntegerType'>, Got: 
> <type 'int'>; (descriptor 'bit_length' requires a 'int' object but received a 
> 'long')
> {code}
> Importing without prepared statements, {{WITH HEADER = TRUE AND 
> PREPAREDSTATEMENTS = False}} works without problems.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to