You are viewing a plain text version of this content. The canonical link for it is here.
Posted to client-dev@cassandra.apache.org by Anthony Molinaro <an...@alumni.caltech.edu> on 2012/03/23 18:55:50 UTC

Re: Erlang Thrift generator broken?

BTW, HEAD of thrift now does the right thing in this case in that name will
be specified as type string() | binary(), and undefined is left off in most
cases.

-Anthony

On Mon, Dec 19, 2011 at 10:11:44AM -0800, Anthony Molinaro wrote:
> This sort of question should probably be sent to the thrift development list but I can answer here that the thrift generator should probably generate a different spec (binaries are returned as that is what comes through in the packets and the thrift library does not process them).  Please file a bug report against the thrift project JIRA.
> 
> Thanks
> 
> -Anthony
> 
> On Dec 18, 2011, at 5:01 PM, Roberto Ostinelli <ro...@widetag.com> wrote:
> 
> > Dear list,
> > 
> > I'm building an Erlang CQL client for Cassandra. I'm using Thrift version 0.8.0, and Cassandra 1.0.5. I've generated the Erlang Thrift code with the command:
> > thrift --gen erl cassandra/interface/cassandra.thrift
> > 
> > One of the generate files, cassandra_types.hrl, seems to have incorrect record definitions. To be more precise:
> > 
> > -record(cqlMetadata, {name_types = dict:new() :: dict(), 
> >                      value_types = dict:new() :: dict(), 
> >                      default_name_type = undefined :: string(),
> >                      default_value_type = undefined :: string()}).
> > 
> > 
> > -record(column, {name = undefined :: string(),
> >        value = undefined :: string(), 
> >                 timestamp = undefined :: integer(), 
> >                 ttl = undefined :: integer()}).
> > 
> > For instance, these two records specify string() in name and value columns, but the real returned values from Cassandra are binary(). Haven't tested it yet, but everytime there's a string() specification in this file, it really seems that it should be binary(), which is what thrift calls return from Cassandra.
> > 
> > Is this the appropriate list where I should report this, or should I do so in some other list dedicated to API development?
> > 
> > Thank you,
> > 
> > r.

-- 
------------------------------------------------------------------------
Anthony Molinaro                           <an...@alumni.caltech.edu>