First, the basic data type:
1, BOOL: Boolean type value, only true and false.
2, Byte:8-bit signed integer.
3, i16:16-bit signed integer.
4, i32:32-bit signed integer.
5, i64:64-bit signed integer.
6, double:64 bit floating point number.
7. String: The type of strings encoded using UTF-8.
Second, special data types:
1, binary: A binary sequence that is not encoded, is actually a byte array.
Third, structural data:
1, custom types, such as the following code defines a person's type:
struct person{ 1:i32 ID,//PersonId 2:string name,//name}
2. Enumeration type:
Enum operation{ add = 1,//Add delete = 2,//delete UPDATE = 3,//change find = 4,//check}
Iv. collection type:
1, List<t>: list types, such as defining a list that stores string types:
struct Person { 1:list<string> address,//List of cities visited}
2, Set<t>: Collection type
3, Map<t1, T2>: Map type for key-value pairs
Reference: Https://git1-us-west.apache.org/repos/asf?p=thrift.git;a=blob;f=tutorial/tutorial.thrift;hb=HEAD
Thrift Data Types