Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4377

CQL3 column value validation bug

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Normal

    Description

      cqlsh> create keyspace test with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor = 1;
      cqlsh> use test;
      cqlsh:test> CREATE TABLE stats (
              ...   gid          blob,
              ...   period     int,
              ...   tid          blob, 
              ...   sum        int,
              ...   uniques           blob,
              ...   PRIMARY KEY(gid, period, tid)
              ... );
      cqlsh:test> describe columnfamily stats;
      
      CREATE TABLE stats (
        gid blob PRIMARY KEY
      ) WITH
        comment='' AND
        comparator='CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.BytesType,org.apache.cassandra.db.marshal.UTF8Type)' AND
        read_repair_chance=0.100000 AND
        gc_grace_seconds=864000 AND
        default_validation=text AND
        min_compaction_threshold=4 AND
        max_compaction_threshold=32 AND
        replicate_on_write='true' AND
        compaction_strategy_class='SizeTieredCompactionStrategy' AND
        compression_parameters:sstable_compression='SnappyCompressor';
      

      You can see in the above output that the stats cf is created with the column validator set to text, but neither of the non primary key columns defined are text. It should either be setting metadata for those columns or not setting a default validator or some combination of the two.

      Attachments

        1. 4377.txt
          2 kB
          Sylvain Lebresne
        2. CASSANDRA-4377.patch
          5 kB
          Pavel Yaskevich
        3. 4377-2.txt
          5 kB
          Sylvain Lebresne

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            xedin Pavel Yaskevich Assign to me
            nickmbailey Nick Bailey
            Pavel Yaskevich
            Sylvain Lebresne
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment