cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-13408) Cqlsh COPY FROM fails to parse varints
Date Wed, 05 Apr 2017 01:49:41 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-13408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stefania updated CASSANDRA-13408:
---------------------------------
    Description: 
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.

  was:
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 'dse.cqltypes.IntegerType'>, Got: <type 'int'>; (descriptor 'bit_length'
requires a 'int' o
bject but received a 'long')
{code}

Importing without prepared statements, {{WITH HEADER = TRUE AND PREPAREDSTATEMENTS = False}}
works without problems.


> 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)

Mime
View raw message