6 #ifndef __CREATE_DELTA_TABLE_H__
7 #define __CREATE_DELTA_TABLE_H__
18 struct CreateDeltaTableRequest
26 CreateDeltaTableRequest() :
27 deltaTableName(std::string()),
28 tableName(std::string()),
29 options(std::map<std::string, std::string>())
43 CreateDeltaTableRequest(
const std::string& deltaTableName_,
const std::string& tableName_,
const std::map<std::string, std::string>& options_):
44 deltaTableName( deltaTableName_ ),
45 tableName( tableName_ ),
50 std::string deltaTableName;
51 std::string tableName;
52 std::map<std::string, std::string> options;
62 template<>
struct codec_traits<gpudb::CreateDeltaTableRequest>
64 static void encode(Encoder& e,
const gpudb::CreateDeltaTableRequest& v)
66 ::avro::encode(e, v.deltaTableName);
67 ::avro::encode(e, v.tableName);
68 ::avro::encode(e, v.options);
71 static void decode(Decoder& d, gpudb::CreateDeltaTableRequest& v)
73 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
75 const std::vector<size_t> fo = rd->fieldOrder();
77 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
82 ::avro::decode(d, v.deltaTableName);
86 ::avro::decode(d, v.tableName);
90 ::avro::decode(d, v.options);
100 ::avro::decode(d, v.deltaTableName);
101 ::avro::decode(d, v.tableName);
102 ::avro::decode(d, v.options);
117 struct CreateDeltaTableResponse
125 CreateDeltaTableResponse() :
126 deltaTableName(std::string()),
127 info(std::map<std::string, std::string>())
131 std::string deltaTableName;
132 std::map<std::string, std::string> info;
142 template<>
struct codec_traits<gpudb::CreateDeltaTableResponse>
144 static void encode(Encoder& e,
const gpudb::CreateDeltaTableResponse& v)
146 ::avro::encode(e, v.deltaTableName);
147 ::avro::encode(e, v.info);
150 static void decode(Decoder& d, gpudb::CreateDeltaTableResponse& v)
152 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
154 const std::vector<size_t> fo = rd->fieldOrder();
156 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
161 ::avro::decode(d, v.deltaTableName);
165 ::avro::decode(d, v.info);
175 ::avro::decode(d, v.deltaTableName);
176 ::avro::decode(d, v.info);