Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 63441 invoked from network); 25 Dec 2010 06:06:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Dec 2010 06:06:15 -0000 Received: (qmail 61192 invoked by uid 500); 25 Dec 2010 06:06:13 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 61111 invoked by uid 500); 25 Dec 2010 06:06:12 -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 61103 invoked by uid 99); 25 Dec 2010 06:06:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Dec 2010 06:06:12 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 209.85.160.44 as permitted sender) Received: from [209.85.160.44] (HELO mail-pw0-f44.google.com) (209.85.160.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Dec 2010 06:06:05 +0000 Received: by pwi7 with SMTP id 7so882464pwi.31 for ; Fri, 24 Dec 2010 22:05:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=c6MJKARnx0D6AQeJVvxPj+ZOdC5Q1Y0m/HS0/b2GhwM=; b=HJP4V8hBHuV1JN7uoOAJpq1rPr0Hch38oGs5/0X6K03gj/EeeLmvI51/Kzx7qGl0U5 jI1Tt2G2s4lqu0C3dy4eyGpbz/C8l1jH3x3fZV6cpQGy3jKr/avBizRVbR3axBHgv/Uj MUUz49clx8H4P+twA2HO8MSyNT1QqgmD+YH7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=iIoJ8EM7mdOC9V5mQi9/Y99TPOxGUjKaJB5ZZ4WO+p6lhaVLAWxCfTMeXyIwgorrqp E9vNxq8752SqUUiWRcYmE+wP3F7uYS6IFDYCVh/tYhi+09bvqyEgobvqLH3lAsuHgz1d wCIB1j/ZXODDUpiMhMKSG8RHOiX1Q/VUvg5+c= MIME-Version: 1.0 Received: by 10.142.143.9 with SMTP id q9mr2721227wfd.330.1293257144583; Fri, 24 Dec 2010 22:05:44 -0800 (PST) Received: by 10.142.43.19 with HTTP; Fri, 24 Dec 2010 22:05:44 -0800 (PST) In-Reply-To: References: Date: Sat, 25 Dec 2010 00:05:44 -0600 Message-ID: Subject: Re: Newbie question - fetching multiple columns of different datatypes and conversion from byte[] From: Jonathan Ellis To: user Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Or you can specify the types with the column name instead of doing a slice. On Fri, Dec 24, 2010 at 11:23 PM, Nate McCall wrote: > In the case where you have different value types within the same > slice, yes, you must handle the conversion yourself and > ByteBufferSerializer is the easiest way to do that. > > On Fri, Dec 24, 2010 at 10:44 PM, Roshan Dawrani > wrote: >> Hi, >> >> I am new to Cassandra and Hector and have a basic question on fetching >> multiple columns of a row that have mixed data types. >> >> So, I am basically doing equivalent of "Select dateCol1, dateCol2, >> stringCol1, intCol1 from a_table where key in (?, ?, ?...)" >> >> My question is do I need to do the conversion of columns from byte[] to >> Date/String/Int myself after taking out data from the ColumnSlice? >> >> For saving the same data, while adding the columns, I was able to tell which >> serializer to use, but slice queries seem to take only one ValueSerializer >> for all columns being retrieved. So, if I have got it correctly, I can only >> use ByteBufferSerializer in the Hector API slice query call and then do >> further data-type specific conversion myself at the app level? >> >> -- >> Roshan >> Blog: http://roshandawrani.wordpress.com/ >> Twitter: @roshandawrani >> Skype: roshandawrani >> > -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com