Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A93A108AC for ; Fri, 30 Aug 2013 17:45:36 +0000 (UTC) Received: (qmail 76925 invoked by uid 500); 30 Aug 2013 17:45:33 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 76913 invoked by uid 500); 30 Aug 2013 17:45:33 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 76903 invoked by uid 99); 30 Aug 2013 17:45:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Aug 2013 17:45:32 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jonathan.haddad@gmail.com designates 209.85.220.52 as permitted sender) Received: from [209.85.220.52] (HELO mail-pa0-f52.google.com) (209.85.220.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Aug 2013 17:45:26 +0000 Received: by mail-pa0-f52.google.com with SMTP id kq13so2602225pab.25 for ; Fri, 30 Aug 2013 10:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:content-type:message-id:mime-version:subject:date :references:to:in-reply-to; bh=dyHo+e+Cb2PnbvWkmv4NCkU7rGoYPpe3L1AzmtwA4cA=; b=aNA4YfxEetAYkR84K+WMJNt6bcL0V1d6drv2CRkAcKZhj2wk5iJ0zOtd1GMWCheIHo AALBwEBQTDUT7S08CxWfstIpg6S5lk3uYkTksPnOn0UlGwU5BqJNXvc+6j78L+e91XgP O8J00J56TCqTywT4mQu5/+buIQhawmD4WltuKhDsCfdtCRQEs7pfyLCymQ8mPZaWCvvk zQWWYwTpe0lkCtCp7xe3hpHF4IgrYgmHHmTVKVT4nzY41cHES5GtHvLiMtinnc8JR231 TkXuQ+NxPSeblPOv0e9RgtN/JJfJmaBwV22iesoPxYaxLyOL6dgizILzfain00EsW50o 4eLQ== X-Received: by 10.68.137.170 with SMTP id qj10mr11350159pbb.31.1377884706679; Fri, 30 Aug 2013 10:45:06 -0700 (PDT) Received: from [192.168.1.61] (rrcs-76-79-124-126.west.biz.rr.com. [76.79.124.126]) by mx.google.com with ESMTPSA id ts6sm45745268pbc.12.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Aug 2013 10:45:05 -0700 (PDT) Sender: Jon Haddad From: Jon Haddad Content-Type: multipart/alternative; boundary="Apple-Mail=_8CFEE23A-CE3B-4C97-82F1-EA1743DB7351" Message-Id: <61E7EDCF-0F8D-4C4C-8D35-DF7808B24136@jonhaddad.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: CQL & Thrift Date: Fri, 30 Aug 2013 10:45:06 -0700 References: To: user@cassandra.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_8CFEE23A-CE3B-4C97-82F1-EA1743DB7351 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 If you're going to work with CQL, work with CQL. If you're going to = work with Thrift, work with Thrift. Don't mix. On Aug 30, 2013, at 10:38 AM, Vivek Mishra = wrote: > Hi, > If i a create a table with CQL3 as=20 >=20 > create table user(user_id text PRIMARY KEY, first_name text, last_name = text, emailid text); >=20 > and create index as: > create index on user(first_name); >=20 > then inserted some data as: > insert into user(user_id,first_name,last_name,"emailId") = values('@mevivs','vivek','mishra','vivek.mishra@impetus.co.in'); >=20 >=20 > Then if update same column family using Cassandra-cli as: >=20 > update column family user with key_validation_class=3D'UTF8Type' and = column_metadata=3D[{column_name:last_name, validation_class:'UTF8Type', = index_type:KEYS},{column_name:first_name, validation_class:'UTF8Type', = index_type:KEYS}]; >=20 >=20 > Now if i connect via cqlsh and explore user table, i can see column = first_name,last_name are not part of table structure anymore. Here is = the output: >=20 > CREATE TABLE user ( > key text PRIMARY KEY > ) WITH > bloom_filter_fp_chance=3D0.010000 AND > caching=3D'KEYS_ONLY' AND > comment=3D'' AND > dclocal_read_repair_chance=3D0.000000 AND > gc_grace_seconds=3D864000 AND > read_repair_chance=3D0.100000 AND > replicate_on_write=3D'true' AND > populate_io_cache_on_flush=3D'false' AND > compaction=3D{'class': 'SizeTieredCompactionStrategy'} AND > compression=3D{'sstable_compression': 'SnappyCompressor'}; >=20 > cqlsh:cql3usage> select * from user; >=20 > user_id > --------- > @mevivs >=20 >=20 >=20 >=20 >=20 > I understand that, CQL3 and thrift interoperability is an issue. But = this looks to me a very basic scenario. >=20 >=20 >=20 > Any suggestions? Or If anybody can explain a reason behind this? >=20 > -Vivek >=20 >=20 >=20 >=20 --Apple-Mail=_8CFEE23A-CE3B-4C97-82F1-EA1743DB7351 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1
If you're going to work with CQL, work with CQL.  If you're going to work with Thrift, work with Thrift.  Don't mix.

On Aug 30, 2013, at 10:38 AM, Vivek Mishra <mishra.vivs@gmail.com> wrote:

Hi,
If i a create a table with CQL3 as 

create table user(user_id text PRIMARY KEY, first_name text, last_name text, emailid text);

and create index as:
create index on user(first_name);

then inserted some data as:
insert into user(user_id,first_name,last_name,"emailId") values('@mevivs','vivek','mishra','vivek.mishra@impetus.co.in');


Then if update same column family using Cassandra-cli as:

update column family user with key_validation_class='UTF8Type' and column_metadata=[{column_name:last_name, validation_class:'UTF8Type', index_type:KEYS},{column_name:first_name, validation_class:'UTF8Type', index_type:KEYS}];


Now if i connect via cqlsh and explore user table, i can see column first_name,last_name are not part of table structure anymore. Here is the output:

CREATE TABLE user (
  key text PRIMARY KEY
) WITH
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  read_repair_chance=0.100000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'SnappyCompressor'};

cqlsh:cql3usage> select * from user;

 user_id
---------
 @mevivs





I understand that, CQL3 and thrift interoperability is an issue. But this looks to me a very basic scenario.



Any suggestions? Or If anybody can explain a reason behind this?

-Vivek





--Apple-Mail=_8CFEE23A-CE3B-4C97-82F1-EA1743DB7351--