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

CQL Schema metadata does not contain Type information for the key unless the key is selected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Won't Fix
    • None
    • None
    • Low

    Description

      The CQL ResultSchema does not contain type information for the key unless the key is actually part of the CQL query. It's available in the column family schema but that's what we're trying to avoid by having a ResultSchema in the first place.

      CREATE COLUMNFAMILY test (id varchar PRIMARY KEY, serial int)
      INSERT INTO test (id, serial) VALUES ('test', 12345)
      SELECT serial FROM test where id='test'

      1. The Result Schema
          • !ruby/object:CassandraCQL::ResultSchema
            names: {}

      values:
      serial: Int32Type

      1. The row with no way to properly cast the key (though I used varchar here to make a functional example)
          • !ruby/object:CassandraCQL::Thrift::CqlRow
            columns:
      • !ruby/object:CassandraCQL::Thrift::Column
        name: serial
        timestamp: 1321893998457001
        value: !binary |
        AAAwOQ==

      key: test

      Attachments

        Activity

          People

            Unassigned Unassigned
            kreynolds Kelley Reynolds
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: