6 #ifndef __CREATE_DELTA_TABLE_H__ 7 #define __CREATE_DELTA_TABLE_H__ 12 struct CreateDeltaTableRequest
14 CreateDeltaTableRequest() :
15 deltaTableName(std::string()),
16 tableName(std::string()),
17 options(std::map<std::string, std::string>())
21 CreateDeltaTableRequest(
const std::string& deltaTableName_,
const std::string& tableName_,
const std::map<std::string, std::string>& options_):
22 deltaTableName( deltaTableName_ ),
23 tableName( tableName_ ),
28 std::string deltaTableName;
29 std::string tableName;
30 std::map<std::string, std::string> options;
36 template<>
struct codec_traits<
gpudb::CreateDeltaTableRequest>
38 static void encode(Encoder& e,
const gpudb::CreateDeltaTableRequest& v)
40 ::avro::encode(e, v.deltaTableName);
41 ::avro::encode(e, v.tableName);
42 ::avro::encode(e, v.options);
45 static void decode(Decoder& d, gpudb::CreateDeltaTableRequest& v)
47 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
49 const std::vector<size_t> fo = rd->fieldOrder();
51 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
56 ::avro::decode(d, v.deltaTableName);
60 ::avro::decode(d, v.tableName);
64 ::avro::decode(d, v.options);
74 ::avro::decode(d, v.deltaTableName);
75 ::avro::decode(d, v.tableName);
76 ::avro::decode(d, v.options);
85 struct CreateDeltaTableResponse
87 CreateDeltaTableResponse() :
88 deltaTableName(std::string()),
89 info(std::map<std::string, std::string>())
93 std::string deltaTableName;
94 std::map<std::string, std::string> info;
100 template<>
struct codec_traits<
gpudb::CreateDeltaTableResponse>
102 static void encode(Encoder& e,
const gpudb::CreateDeltaTableResponse& v)
104 ::avro::encode(e, v.deltaTableName);
105 ::avro::encode(e, v.info);
108 static void decode(Decoder& d, gpudb::CreateDeltaTableResponse& v)
110 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
112 const std::vector<size_t> fo = rd->fieldOrder();
114 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
119 ::avro::decode(d, v.deltaTableName);
123 ::avro::decode(d, v.info);
133 ::avro::decode(d, v.deltaTableName);
134 ::avro::decode(d, v.info);
140 #endif // __CREATE_DELTA_TABLE_H__