[ 
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

Reply via email to