You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Vivek Mishra (JIRA)" <ji...@apache.org> on 2012/10/09 12:06:02 UTC
[jira] [Created] (CASSANDRA-4779) Boolean type of composite column
of compound primary key converted into UTF8Type
Vivek Mishra created CASSANDRA-4779:
---------------------------------------
Summary: Boolean type of composite column of compound primary key converted into UTF8Type
Key: CASSANDRA-4779
URL: https://issues.apache.org/jira/browse/CASSANDRA-4779
Project: Cassandra
Issue Type: Bug
Affects Versions: 1.1.5
Reporter: Vivek Mishra
Steps to reproduce:
1) connect to cqlsh --cql3
2) create keyspace testcomp;
3) CREATE TABLE altercations (
instigator text,
started_at timestamp,
ships_destroyed int,
energy_used float,
alliance_involvement boolean,
PRIMARY KEY (instigator,started_at,ships_destroyed)
4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
energy_used, alliance_involvement)
VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
5) select * from altercations; gives output:
instigator | started_at | ships_destroyed | alliance_involvement | energy_used
------------+--------------------------+-----------------+----------------------+-------------
Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
But when try to connect via cassandra-cli and execute:
6)list altercations; (output gives an error as below):
Using default limit of 100
Using default column limit of 100
-------------------
RowKey: Jayne Cobb
=> (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
invalid UTF8 bytes 40933333
gives me {invalid UTF8 bytes 40933333}
Keyspace description:
Keyspace: testcomp:
Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
Durable Writes: true
Options: [datacenter1:1]
Column Families:
ColumnFamily: altercations
Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
GC grace seconds: 864000
Compaction min/max thresholds: 4/32
Read repair chance: 0.1
DC Local Read repair chance: 0.0
Replicate on write: true
Caching: KEYS_ONLY
Bloom Filter FP chance: default
Built indexes: []
Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
Compression Options:
sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
Issue:
org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
Although alliance_involvement is of "boolean" data type! which is causing this issue.
Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CASSANDRA-4779) Boolean type of composite column
of compound primary key converted into UTF8Type
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-4779.
---------------------------------------
Resolution: Not A Problem
cli interoperation with CQL3 CFs is not supported; see CASSANDRA-4377
> Boolean type of composite column of compound primary key converted into UTF8Type
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-4779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4779
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.5
> Reporter: Vivek Mishra
>
> Steps to reproduce:
> 1) connect to cqlsh --cql3
> 2) create keyspace testcomp;
> 3) CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at,ships_destroyed)
> 4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
> energy_used, alliance_involvement)
> VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
> 5) select * from altercations; gives output:
> instigator | started_at | ships_destroyed | alliance_involvement | energy_used
> ------------+--------------------------+-----------------+----------------------+-------------
> Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
> But when try to connect via cassandra-cli and execute:
>
> 6)list altercations; (output gives an error as below):
> Using default limit of 100
> Using default column limit of 100
> -------------------
> RowKey: Jayne Cobb
> => (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
> invalid UTF8 bytes 40933333
> gives me {invalid UTF8 bytes 40933333}
> Keyspace description:
> Keyspace: testcomp:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [datacenter1:1]
> Column Families:
> ColumnFamily: altercations
> Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
> Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
> Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 0.1
> DC Local Read repair chance: 0.0
> Replicate on write: true
> Caching: KEYS_ONLY
> Bloom Filter FP chance: default
> Built indexes: []
> Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
> Compression Options:
> sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> Issue:
> org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> Although alliance_involvement is of "boolean" data type! which is causing this issue.
> Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4779) Boolean type of composite
column of compound primary key converted into UTF8Type
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472430#comment-13472430 ]
Brandon Williams commented on CASSANDRA-4779:
---------------------------------------------
You are. Please see CASSANDRA-4377 if you want all the details, but Jonathan's original summary is all you really need to know. Mixing a non-cql client (cassandra-cli) with a CQL3 CF is not supported.
> Boolean type of composite column of compound primary key converted into UTF8Type
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-4779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4779
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.5
> Reporter: Vivek Mishra
>
> Steps to reproduce:
> 1) connect to cqlsh --cql3
> 2) create keyspace testcomp;
> 3) CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at,ships_destroyed)
> 4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
> energy_used, alliance_involvement)
> VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
> 5) select * from altercations; gives output:
> instigator | started_at | ships_destroyed | alliance_involvement | energy_used
> ------------+--------------------------+-----------------+----------------------+-------------
> Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
> But when try to connect via cassandra-cli and execute:
>
> 6)list altercations; (output gives an error as below):
> Using default limit of 100
> Using default column limit of 100
> -------------------
> RowKey: Jayne Cobb
> => (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
> invalid UTF8 bytes 40933333
> gives me {invalid UTF8 bytes 40933333}
> Keyspace description:
> Keyspace: testcomp:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [datacenter1:1]
> Column Families:
> ColumnFamily: altercations
> Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
> Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
> Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 0.1
> DC Local Read repair chance: 0.0
> Replicate on write: true
> Caching: KEYS_ONLY
> Bloom Filter FP chance: default
> Built indexes: []
> Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
> Compression Options:
> sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> Issue:
> org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> Although alliance_involvement is of "boolean" data type! which is causing this issue.
> Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4779) Boolean type of composite
column of compound primary key converted into UTF8Type
Posted by "Vivek Mishra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472439#comment-13472439 ]
Vivek Mishra commented on CASSANDRA-4779:
-----------------------------------------
Thanks Brandon and Jonathan. I have already gone through https://issues.apache.org/jira/browse/CASSANDRA-4377 and Brian's blog as well. Looks like i did miss some last conversation on 4377 earlier.
Cheers,
-Vivek
> Boolean type of composite column of compound primary key converted into UTF8Type
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-4779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4779
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.5
> Reporter: Vivek Mishra
>
> Steps to reproduce:
> 1) connect to cqlsh --cql3
> 2) create keyspace testcomp;
> 3) CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at,ships_destroyed)
> 4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
> energy_used, alliance_involvement)
> VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
> 5) select * from altercations; gives output:
> instigator | started_at | ships_destroyed | alliance_involvement | energy_used
> ------------+--------------------------+-----------------+----------------------+-------------
> Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
> But when try to connect via cassandra-cli and execute:
>
> 6)list altercations; (output gives an error as below):
> Using default limit of 100
> Using default column limit of 100
> -------------------
> RowKey: Jayne Cobb
> => (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
> invalid UTF8 bytes 40933333
> gives me {invalid UTF8 bytes 40933333}
> Keyspace description:
> Keyspace: testcomp:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [datacenter1:1]
> Column Families:
> ColumnFamily: altercations
> Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
> Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
> Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 0.1
> DC Local Read repair chance: 0.0
> Replicate on write: true
> Caching: KEYS_ONLY
> Bloom Filter FP chance: default
> Built indexes: []
> Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
> Compression Options:
> sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> Issue:
> org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> Although alliance_involvement is of "boolean" data type! which is causing this issue.
> Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4779) Boolean type of composite
column of compound primary key converted into UTF8Type
Posted by "Vivek Mishra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472377#comment-13472377 ]
Vivek Mishra commented on CASSANDRA-4779:
-----------------------------------------
So if a column family created via cql client with one composite column of boolean type, It's metadata will be of BooleanType or UTF8Type?
> Boolean type of composite column of compound primary key converted into UTF8Type
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-4779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4779
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.5
> Reporter: Vivek Mishra
>
> Steps to reproduce:
> 1) connect to cqlsh --cql3
> 2) create keyspace testcomp;
> 3) CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at,ships_destroyed)
> 4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
> energy_used, alliance_involvement)
> VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
> 5) select * from altercations; gives output:
> instigator | started_at | ships_destroyed | alliance_involvement | energy_used
> ------------+--------------------------+-----------------+----------------------+-------------
> Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
> But when try to connect via cassandra-cli and execute:
>
> 6)list altercations; (output gives an error as below):
> Using default limit of 100
> Using default column limit of 100
> -------------------
> RowKey: Jayne Cobb
> => (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
> invalid UTF8 bytes 40933333
> gives me {invalid UTF8 bytes 40933333}
> Keyspace description:
> Keyspace: testcomp:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [datacenter1:1]
> Column Families:
> ColumnFamily: altercations
> Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
> Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
> Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 0.1
> DC Local Read repair chance: 0.0
> Replicate on write: true
> Caching: KEYS_ONLY
> Bloom Filter FP chance: default
> Built indexes: []
> Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
> Compression Options:
> sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> Issue:
> org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> Although alliance_involvement is of "boolean" data type! which is causing this issue.
> Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4779) Boolean type of composite
column of compound primary key converted into UTF8Type
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472408#comment-13472408 ]
Jonathan Ellis commented on CASSANDRA-4779:
-------------------------------------------
Neither, it will be CompositeType.
If you absolutely must mess with CQL definitions from (non-CQL) Thrift, Brian O'Neill has blogged an example: http://brianoneill.blogspot.com/2012/10/cql-astyanax-and-compoundcomposite-keys.html
> Boolean type of composite column of compound primary key converted into UTF8Type
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-4779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4779
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.5
> Reporter: Vivek Mishra
>
> Steps to reproduce:
> 1) connect to cqlsh --cql3
> 2) create keyspace testcomp;
> 3) CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at,ships_destroyed)
> 4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
> energy_used, alliance_involvement)
> VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
> 5) select * from altercations; gives output:
> instigator | started_at | ships_destroyed | alliance_involvement | energy_used
> ------------+--------------------------+-----------------+----------------------+-------------
> Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
> But when try to connect via cassandra-cli and execute:
>
> 6)list altercations; (output gives an error as below):
> Using default limit of 100
> Using default column limit of 100
> -------------------
> RowKey: Jayne Cobb
> => (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
> invalid UTF8 bytes 40933333
> gives me {invalid UTF8 bytes 40933333}
> Keyspace description:
> Keyspace: testcomp:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [datacenter1:1]
> Column Families:
> ColumnFamily: altercations
> Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
> Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
> Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 0.1
> DC Local Read repair chance: 0.0
> Replicate on write: true
> Caching: KEYS_ONLY
> Bloom Filter FP chance: default
> Built indexes: []
> Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
> Compression Options:
> sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> Issue:
> org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> Although alliance_involvement is of "boolean" data type! which is causing this issue.
> Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4779) Boolean type of composite
column of compound primary key converted into UTF8Type
Posted by "Vivek Mishra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472428#comment-13472428 ]
Vivek Mishra commented on CASSANDRA-4779:
-----------------------------------------
CompositeType:
org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type).
This is what i can see is CompositeType. For boolean composite column it is displayed as "UTF8Type"(see last one).
I hope, am making myself clear.
-Vivek
> Boolean type of composite column of compound primary key converted into UTF8Type
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-4779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4779
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.5
> Reporter: Vivek Mishra
>
> Steps to reproduce:
> 1) connect to cqlsh --cql3
> 2) create keyspace testcomp;
> 3) CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at,ships_destroyed)
> 4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
> energy_used, alliance_involvement)
> VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
> 5) select * from altercations; gives output:
> instigator | started_at | ships_destroyed | alliance_involvement | energy_used
> ------------+--------------------------+-----------------+----------------------+-------------
> Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
> But when try to connect via cassandra-cli and execute:
>
> 6)list altercations; (output gives an error as below):
> Using default limit of 100
> Using default column limit of 100
> -------------------
> RowKey: Jayne Cobb
> => (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
> invalid UTF8 bytes 40933333
> gives me {invalid UTF8 bytes 40933333}
> Keyspace description:
> Keyspace: testcomp:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [datacenter1:1]
> Column Families:
> ColumnFamily: altercations
> Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
> Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
> Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 0.1
> DC Local Read repair chance: 0.0
> Replicate on write: true
> Caching: KEYS_ONLY
> Bloom Filter FP chance: default
> Built indexes: []
> Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
> Compression Options:
> sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> Issue:
> org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> Although alliance_involvement is of "boolean" data type! which is causing this issue.
> Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4779) Boolean type of composite column
of compound primary key converted into UTF8Type
Posted by "Vivek Mishra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vivek Mishra updated CASSANDRA-4779:
------------------------------------
Description:
Steps to reproduce:
1) connect to cqlsh --cql3
2) create keyspace testcomp;
3) CREATE TABLE altercations (
instigator text,
started_at timestamp,
ships_destroyed int,
energy_used float,
alliance_involvement boolean,
PRIMARY KEY (instigator,started_at,ships_destroyed)
4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
energy_used, alliance_involvement)
VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
5) select * from altercations; gives output:
instigator | started_at | ships_destroyed | alliance_involvement | energy_used
------------+--------------------------+-----------------+----------------------+-------------
Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
But when try to connect via cassandra-cli and execute:
6)list altercations; (output gives an error as below):
Using default limit of 100
Using default column limit of 100
-------------------
RowKey: Jayne Cobb
=> (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
invalid UTF8 bytes 40933333
gives me {invalid UTF8 bytes 40933333}
Keyspace description:
Keyspace: testcomp:
Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
Durable Writes: true
Options: [datacenter1:1]
Column Families:
ColumnFamily: altercations
Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
GC grace seconds: 864000
Compaction min/max thresholds: 4/32
Read repair chance: 0.1
DC Local Read repair chance: 0.0
Replicate on write: true
Caching: KEYS_ONLY
Bloom Filter FP chance: default
Built indexes: []
Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
Compression Options:
sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
Issue:
org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
Although alliance_involvement is of "boolean" data type! which is causing this issue.
Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
was:
Steps to reproduce:
1) connect to cqlsh --cql3
2) create keyspace testcomp;
3) CREATE TABLE altercations (
instigator text,
started_at timestamp,
ships_destroyed int,
energy_used float,
alliance_involvement boolean,
PRIMARY KEY (instigator,started_at,ships_destroyed)
4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
energy_used, alliance_involvement)
VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
5) select * from altercations; gives output:
instigator | started_at | ships_destroyed | alliance_involvement | energy_used
------------+--------------------------+-----------------+----------------------+-------------
Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
But when try to connect via cassandra-cli and execute:
6)list altercations; (output gives an error as below):
Using default limit of 100
Using default column limit of 100
-------------------
RowKey: Jayne Cobb
=> (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
invalid UTF8 bytes 40933333
gives me {invalid UTF8 bytes 40933333}
Keyspace description:
Keyspace: testcomp:
Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
Durable Writes: true
Options: [datacenter1:1]
Column Families:
ColumnFamily: altercations
Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
GC grace seconds: 864000
Compaction min/max thresholds: 4/32
Read repair chance: 0.1
DC Local Read repair chance: 0.0
Replicate on write: true
Caching: KEYS_ONLY
Bloom Filter FP chance: default
Built indexes: []
Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
Compression Options:
sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
Issue:
org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
Although alliance_involvement is of "boolean" data type! which is causing this issue.
Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
> Boolean type of composite column of compound primary key converted into UTF8Type
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-4779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4779
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.5
> Reporter: Vivek Mishra
>
> Steps to reproduce:
> 1) connect to cqlsh --cql3
> 2) create keyspace testcomp;
> 3) CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at,ships_destroyed)
> 4) INSERT INTO altercations (instigator, started_at, ships_destroyed,
> energy_used, alliance_involvement)
> VALUES ('Jayne Cobb', '2012-07-24', 2, 4.6, 'false');
> 5) select * from altercations; gives output:
> instigator | started_at | ships_destroyed | alliance_involvement | energy_used
> ------------+--------------------------+-----------------+----------------------+-------------
> Jayne Cobb | 2012-07-23 00:00:00+0000 | 2 | False | 4.6
> But when try to connect via cassandra-cli and execute:
>
> 6)list altercations; (output gives an error as below):
> Using default limit of 100
> Using default column limit of 100
> -------------------
> RowKey: Jayne Cobb
> => (column=2012-07-23 00:00:00+0530:2:alliance_involvement, value=, timestamp=1349772570037000)
> invalid UTF8 bytes 40933333
> gives me {invalid UTF8 bytes 40933333}
> Keyspace description:
> Keyspace: testcomp:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [datacenter1:1]
> Column Families:
> ColumnFamily: altercations
> Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
> Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
> Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 0.1
> DC Local Read repair chance: 0.0
> Replicate on write: true
> Caching: KEYS_ONLY
> Bloom Filter FP chance: default
> Built indexes: []
> Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
> Compression Options:
> sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> Issue:
> org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
> Although alliance_involvement is of "boolean" data type! which is causing this issue.
> Looks like an issue with CompositeType creation, somehow boolean is also treated as UTF8Type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira