You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Felix Martini <fm...@gmail.com> on 2009/07/29 21:53:55 UTC

Thrift interface: struct field names

Hi all,

Structs in the Thrift interface have field names with underscores. The
Thrift code generator does not convert them to camel case names which
is common for .NET, e.g. a Column_family property is generated instead
of ColumnFamily for the ColumnParent class. If i understand it
correctly the Thrift wire format only uses the field identifier and
type and not the name. So if i change the field names of the Cassandra
interface file to camel case and generate the interface code, the code
should still work with Cassandra servers. Is that correct?

Best regards,
Felix

Re: Thrift interface: struct field names

Posted by Michael Greene <mi...@gmail.com>.
That's substantially true, yes.  Any other utilities built on top of the
original generated C# code will likely fail, or any introspection utilities
expecting those field names, but at the protocol and transport layers (and
on the Java server side) you will see no difference.

Michael

On Wed, Jul 29, 2009 at 2:53 PM, Felix Martini <fm...@gmail.com> wrote:

> Hi all,
>
> Structs in the Thrift interface have field names with underscores. The
> Thrift code generator does not convert them to camel case names which
> is common for .NET, e.g. a Column_family property is generated instead
> of ColumnFamily for the ColumnParent class. If i understand it
> correctly the Thrift wire format only uses the field identifier and
> type and not the name. So if i change the field names of the Cassandra
> interface file to camel case and generate the interface code, the code
> should still work with Cassandra servers. Is that correct?
>
> Best regards,
> Felix
>