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 A7214190BF for ; Wed, 30 Mar 2016 13:41:48 +0000 (UTC) Received: (qmail 16502 invoked by uid 500); 30 Mar 2016 13:41:23 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 16352 invoked by uid 500); 30 Mar 2016 13:41:19 -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 15959 invoked by uid 99); 30 Mar 2016 13:41:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2016 13:41:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 47268180578 for ; Wed, 30 Mar 2016 13:41:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id RhaoCK3vnDkl for ; Wed, 30 Mar 2016 13:41:13 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 9B8A85F399 for ; Wed, 30 Mar 2016 13:41:12 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id 191so90298845wmq.0 for ; Wed, 30 Mar 2016 06:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=XbzPkLgVBowQpnbIRrdpVOhk/5WI7/Adr55uS4BZatI=; b=zOlIrt2Q5SUKo68SpGKmxllZDbW1vUfhZF/sn5Qxm6j3VJFVcLF8ZjLL0qYvwbWky/ R/gOZgSzZliyjxQNknBoCfXcLiRqHQlBK2Hq9o1QjEFvAqvDSm3CMQQiXT6m42BTkdqJ /+8pKG/SMNP7BI0yKZbXmMOJtmZ/iBLKL65wvhbNF+YI4UCyZhxUgL1Rsr6A02sAliQp clQ1/NRYXZmT55BSiaFfens2t8xAMsSWfKAfP1NTB+v3X29DCb9q2v9mD18xG5Dx0OsX m0m0X1P4mABnHb1cgs5Z9yr1WUUyKffBiIViOTGMWuTxRfuJGpBZTD+y0jKArWYf2BcG IETA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=XbzPkLgVBowQpnbIRrdpVOhk/5WI7/Adr55uS4BZatI=; b=dJ/cQRwT3NR7uADDNg6cycLy8EgtidxhaK/ro0RGTG5WBU7LfOj8skkP/Ctjj+8D2N Eu1uB5zpBZA65DWsrSgEGEQW8FjHCYdaMD2ykzxqy3gp47VCMQpzX936/PpU1od4TGat fhLUHYugtfju5vzCZrn5IpbmwYFm1z0km6bCLUHCsvYX49VGl2+3QOo6Z7ZV6wz+v+MX tQ+y3DrAmY1FSE26j4J3cvYnMNVL9A6uWPCn+ziJfZR1qYYQOvK5W9bvkEp0eMd7bfAZ khFv69BmYvXfZPGZKurKpmwxkX5CuKsTVW+OoXHzxoymwTtLYkvnPrn2mFuVOM6a8Elw Q1zw== X-Gm-Message-State: AD7BkJKGQkMv8HorDQKJ4vdER4qp6t19fhlpI+aJ8eUMVwiSw4FJsUM5VQFbbFLZMNICy0qii+5AGUHNz5CRWQ== MIME-Version: 1.0 X-Received: by 10.28.111.14 with SMTP id k14mr10500362wmc.82.1459345272315; Wed, 30 Mar 2016 06:41:12 -0700 (PDT) Received: by 10.28.113.8 with HTTP; Wed, 30 Mar 2016 06:41:12 -0700 (PDT) In-Reply-To: References: Date: Wed, 30 Mar 2016 15:41:12 +0200 Message-ID: Subject: Re: Migration from 2.0.10 to 2.1.12 From: Jean Carlo To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001a1146a17e8faa93052f444ca2 --001a1146a17e8faa93052f444ca2 Content-Type: text/plain; charset=UTF-8 Yes we did some reads and writes, the problem is that adding double quotes force us to modify our code to change and insert like that INSERT INTO table1 (bill_id, *full*, name,provider_date ,total) values ('qs','full','name','2015-02-23','toltal'); to this INSERT INTO table1 (bill_id, *"full"*, name,provider_date ,total) values ('qs','full','name','2015-02-23','toltal'); this last one is ok, but obviously the first one makes an error: cqlsh:pns_fr_2_jean> INSERT INTO table1 (bill_id, full, name,provider_date ,total) values ('qs','full','name','2015-02-23','toltal'); SyntaxException: and it is because the name of the column is not longer full, is "full" Best regards Jean Carlo "The best way to predict the future is to invent it" Alan Kay On Wed, Mar 30, 2016 at 3:26 PM, Eric Evans wrote: > On Wed, Mar 30, 2016 at 8:08 AM, Jean Carlo > wrote: > > With double quotes it doesn't show error > > > > CREATE TABLE table1 ( bill_id text, "full" text, name text, > > provider_date timestamp, total text, PRIMARY KEY ( bill_id) ) ; > > > > but it changes the name of the column > > I don't think it does though; You're meant to be able to use the > output of DESC TABLE to (re)create these tables, so it's quoted below > for the same reason you did so above. > > Obviously it would be better to have column names that parse without > needing to be double quoted, but it should work. Have you tried some > reads and writes? > > > desc table table1; > > > > CREATE TABLE pns_fr_2_jean.table1 ( > > bill_id text PRIMARY KEY, > > "full" text, > > name text, > > provider_date timestamp, > > total text > > ) > > > > instead of > > > > CREATE TABLE pns_fr_2_jean.table1 ( > > bill_id text PRIMARY KEY, > > full text, > > name text, > > provider_date timestamp, > > total text > > ) > > > -- > Eric Evans > eevans@wikimedia.org > --001a1146a17e8faa93052f444ca2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes we did some reads and writes, the probl= em is that adding double quotes force us to modify our code to change and i= nsert like that

INSERT INTO table1 (bill_id, full, name,provi= der_date ,total) values ('qs','full','name','20= 15-02-23','toltal');

to this

INSERT INTO ta= ble1 (bill_id, "full", name,provider_date ,total) values (= 'qs','full','name','2015-02-23','toltal= ');

this last one is ok, but obviously the first one makes= an error:

cqlsh:pns_fr_2_jean> INSERT INTO table1 (bill_id, full= , name,provider_date ,total) values ('qs','full','name&= #39;,'2015-02-23','toltal');
SyntaxException: <ErrorM= essage code=3D2000 [Syntax error in CQL query] message=3D"line 1:29 no= viable alternative at input 'full' (INSERT INTO table1 (bil= l_id, [full]...)">

and it is because the name of the c= olumn is not longer full, is "full"



Best regards

<= span style=3D"border-collapse:collapse">Jean Carlo

"The best way to predict the future is to invent it" Alan = Kay


On Wed, Mar 30, 2016 at 3:26 PM, Eric Evans = <eevans@wikimedia.org> wrote:
On Wed, Mar 30, 2016 at 8:08 AM,= Jean Carlo <jean.jeancarl4= 8@gmail.com> wrote:
> With double quotes it doesn't show error
>
> CREATE TABLE table1 (=C2=A0 =C2=A0 =C2=A0bill_id text,=C2=A0 =C2=A0 = =C2=A0"full" text,=C2=A0 =C2=A0 =C2=A0name text,
> provider_date timestamp,=C2=A0 =C2=A0 =C2=A0total text,=C2=A0 =C2=A0 = =C2=A0PRIMARY KEY ( bill_id) ) ;
>
> but it changes the name of the column

I don't think it does though; You're meant to be able to use= the
output of DESC TABLE to (re)create these tables, so it's quoted below for the same reason you did so above.

Obviously it would be better to have column names that parse without
needing to be double quoted, but it should work.=C2=A0 Have you tried some<= br> reads and writes?

> desc table table1;
>
> CREATE TABLE pns_fr_2_jean.table1 (
>=C2=A0 =C2=A0 =C2=A0bill_id text PRIMARY KEY,
>=C2=A0 =C2=A0 =C2=A0"full" text,
>=C2=A0 =C2=A0 =C2=A0name text,
>=C2=A0 =C2=A0 =C2=A0provider_date timestamp,
>=C2=A0 =C2=A0 =C2=A0total text
> )
>
> instead of
>
> CREATE TABLE pns_fr_2_jean.table1 (
>=C2=A0 =C2=A0 =C2=A0bill_id text PRIMARY KEY,
>=C2=A0 =C2=A0 =C2=A0full text,
>=C2=A0 =C2=A0 =C2=A0name text,
>=C2=A0 =C2=A0 =C2=A0provider_date timestamp,
>=C2=A0 =C2=A0 =C2=A0total text
> )


--
Eric Evans
eevans@wikimedia.org

--001a1146a17e8faa93052f444ca2--