You are welcome. I traced the problem to a commit of the Python driver that shipped in version 3.8 of the driver. It is fixed in 3.8.1. More details on CASSANDRA-13408 <https://issues.apache.org/jira/browse/CASSANDRA-13408>. I don't think it's related to the OS.
Since Cassandra 3.10 ships with an older version of the driver embedded in a zip file in the lib folder, and this version is not affected, I'm guessing that either the embedded version does not work on OS X, or you are manually using a different version of the driver by setting CQLSH_NO_BUNDLED (which is why I could reproduce it on my laptop). You can run cqlsh with --debug to see the version of the driver that cqlsh is using, for example: *cqlsh --debug* *Using CQL driver: <module 'cassandra' from '/usr/local/lib/python2.7/dist-packages/cassandra_driver-3.8.1-py2.7-linux-x86_64.egg/cassandra/__init__.pyc'>* Can you confirm if you were overriding the Python driver by setting CQLSH_NO_BUNDLED and the version of the driver? On Tue, Apr 4, 2017 at 6:12 PM, Boris Babic <bo...@icloud.com> wrote: > Thanks Stefania, going from memory don't think I noticed this on windows > but haven't got a machine handy to test it on at the moment. > > On Apr 4, 2017, at 19:44, Stefania Alborghetti <stefania.alborghetti@ > datastax.com> wrote: > > I've reproduced the same problem on Linux, and I've opened CASSANDRA-13408 > <https://issues.apache.org/jira/browse/CASSANDRA-13408>. As a workaround, > disable prepared statements and it will work (WITH HEADER = TRUE AND > PREPAREDSTATEMENTS = False). > > On Tue, Apr 4, 2017 at 5:02 PM, Boris Babic <bo...@icloud.com> wrote: > >> >> On Apr 4, 2017, at 7:00 PM, Boris Babic <bo...@icloud.com> wrote: >> >> Hi >> >> I’m testing the write of various datatypes on OS X for fun running >> cassandra 3.10 on a single laptop instance, and from what i can see varint >> should map to java.math.BigInteger and have no problems with Long.MIN_VALE >> , -9223372036854775808, but i can’t see what I’m doing wrong. >> >> cqlsh: 5.0.1 >> cassandra 3.10 >> osx el capitan. >> >> data.csv: >> >> id,varint >> -2147483648 <(214)%20748-3648>,-9223372036854775808 >> 2147483647 <(214)%20748-3647>,9223372036854775807 >> >> COPY mykeyspace.data (id,varint) FROM 'data.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’)* >> >> If I directly type a similar insert in cqlsh no such problem occurs, in >> fact I can make the value many orders of magnitude less and all is fine. >> >> cqlsh> insert into mykeyspace.data (id,varint) >> values(1,-9223372036854775808898989898) ; >> >> Had not observed this before on other OS, is this something todo with the >> way the copy from parser is interpreting varint for values <= -2^63 ? >> >> Thanks for any input >> Boris >> >> >> >> >> >> >> >> >> >> > > > -- > > <http://www.datastax.com/> > > STEFANIA ALBORGHETTI > > Software engineer | +852 6114 9265 <+852%206114%209265> | > stefania.alborghe...@datastax.com > > > [image: http://www.datastax.com/cloud-applications] > <http://www.datastax.com/cloud-applications> > > > > -- <http://www.datastax.com/> STEFANIA ALBORGHETTI Software engineer | +852 6114 9265 | stefania.alborghe...@datastax.com [image: http://www.datastax.com/cloud-applications] <http://www.datastax.com/cloud-applications>