thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konrad Grochowski <hc...@minions.org.pl>
Subject Re: C++ client Issue
Date Fri, 12 Sep 2014 12:50:21 GMT
For optional values use __set_FIELDNAME function or manually set 
__isset__.FIELDNAME bit

Ex.

cvList.back().__set_i32_val(id % 98);


On 12.09.2014 14:23, Parag Pote wrote:
> Hi,
>
> I read a mail from Avinash regarding the following issue on this group,
>
> I have following IDL.
>
> struct ColumnValue {
> 1: optional bool   bool_val       // BOOLEAN
> 2: optional byte   byte_val       // TINYINT
> 3: optional i16    i16_val        // SMALLINT
> 4: optional i32    i32_val        // INT
> 5: optional i64    i64_val        // BIGINT, TIMESTAMP
> 6: optional double double_val     // FLOAT, DOUBLE
> 7: optional string string_val     // CHAR, VARCHAR
> 8: optional binary binary_val     // BINARY
> 9: optional BlobLocator blob_val  // BLOB
> 10: optional ClobLocator clob_val  // CLOB
> }
>
> I am trying to send the list of this ColumnValue to Java Server as follows
>
> for (int id = 1; id <= 100; id++) {
>
> std::vector<ColumnValue> cvList;
>
> cvList.push_back(ColumnValue());
> cvList.back().i32_val = id % 98;
>
> cvList.push_back(ColumnValue());
> cvList.back().i32_val = id;
> }
>
> But On Java side when I do following
>
> ColumnValue.getI32_val()
>
> I am always getting 0.
>
> Avinash - Did you find solution to the problem, b'cus I am also facing the same issue.
>
> Rgds,
> Parag


Mime
View raw message