thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Kuebrich <dan.kuebr...@gmail.com>
Subject Re: Returning Null in thrift server
Date Mon, 22 Jul 2013 15:56:08 GMT
You could use a union to get closer, but it's highly similar to what you
already proposed.  See: https://issues.apache.org/jira/browse/THRIFT-409


On Mon, Jul 22, 2013 at 11:23 AM, Vivek Goel <goelvivek2011@gmail.com>wrote:

> Hi,
>
> Is there a way to return null in thrift server ?
>
> I have a string data type , Which can have three possible values:
>
>    1. Empty String
>    2. Null String
>    3. Some string value
>
> I want to differentiate b/w Empty String and Null String.
>
> Currently I have done like:
>
> MyDataType{
>
> string value;
>
> bool is_null;
>
> }
>
> I set's is_null as true if value is null. Is there any better way of doing
> this ?
> regards
> Vivek Goel
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message