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 9370C673B for ; Sat, 4 Jun 2011 00:06:26 +0000 (UTC) Received: (qmail 3692 invoked by uid 500); 4 Jun 2011 00:06:24 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 3662 invoked by uid 500); 4 Jun 2011 00:06:24 -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 3654 invoked by uid 99); 4 Jun 2011 00:06:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jun 2011 00:06:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-wy0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jun 2011 00:06:18 +0000 Received: by wyb29 with SMTP id 29so2041240wyb.31 for ; Fri, 03 Jun 2011 17:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=YO3mUtyqDaN8oEAFDRaqVlevLJBH6UkQXp+37tyIGic=; b=k3GV7QBWo6H1DfV5qkpnICZE+VEIPNmUNXkMS3sgP4hkgSuiEtV8gOoxLJq1If3CtX xGOWXwIMFFjFhihZkarb+MpJ3E3+tLX4B5vCxZEQvmIVj5dSoPIVnJJLQsRmTv/1Rsve /lh+gdbIa/cjx1YRh/SCR7GaEkxMAP1phaMSo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=tqRda5kASSiYCd0hd/4EpjQ41dhGtzAL9p/wJnUpQQwbiAF54cGAXW1rMdWRwLeRKH 76GJfmdofItJn/19ymXg4NeZN00lC4eAlaPTcuMeHPs7SblVBJ68/nEs26t3lhT8cBAH VyuDKapJEdLkSRygpWx3UBDG1d8f5RRA6KK1U= Received: by 10.216.165.209 with SMTP id e59mr2429166wel.2.1307145958188; Fri, 03 Jun 2011 17:05:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.12.129 with HTTP; Fri, 3 Jun 2011 17:05:38 -0700 (PDT) In-Reply-To: References: From: Jonathan Ellis Date: Fri, 3 Jun 2011 19:05:38 -0500 Message-ID: Subject: Re: CQL - raw bytes values To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org You can use any AbstractType, including custom ones. The format depends on AT.fromString; in the case of bytestype (CQL "bytea") this is hex: SELECT 'd54' FROM MyColumnFamily On Fri, Jun 3, 2011 at 5:45 PM, Michal August=FDn wrote: > Hello, > > I have read a lot about CQL and I looked into source and it seems that > just string, long and uuid can be used as column name/value in CQL > commands. Is there any way how to works with "pure" bytes? I.e. > "SELECT BYTES(3412) FROM MyColumnFamily". > Actually, I wouldn't use CQL without this feature because I have some > data "compressed" - i.e. if I want to store some hash (MD5, SHA256) > then I store raw bytes. > > Thanks! > > Augi > --=20 Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com