feat: add or_replace to CREATE FLOW TASK

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2024-04-25 17:39:22 +08:00
parent 93ebc1ba90
commit d18b1c8b8a
5 changed files with 602 additions and 457 deletions
+142 -111
View File
@@ -57,6 +57,7 @@ PROTOBUF_CONSTEXPR CreateFlowTaskExpr::CreateFlowTaskExpr(
, /*decltype(_impl_.comment_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.sql_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.sink_table_name_)*/nullptr
, /*decltype(_impl_.or_replace_)*/false
, /*decltype(_impl_.create_if_not_exists_)*/false
, /*decltype(_impl_._cached_size_)*/{}} {}
struct CreateFlowTaskExprDefaultTypeInternal {
@@ -375,6 +376,7 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowTaskExpr, _impl_.task_name_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowTaskExpr, _impl_.source_table_names_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowTaskExpr, _impl_.sink_table_name_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowTaskExpr, _impl_.or_replace_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowTaskExpr, _impl_.create_if_not_exists_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowTaskExpr, _impl_.expire_when_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowTaskExpr, _impl_.comment_),
@@ -555,24 +557,24 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
{ 0, -1, -1, sizeof(::greptime::v1::DdlRequest)},
{ 14, 22, -1, sizeof(::greptime::v1::CreateFlowTaskExpr_TaskOptionsEntry_DoNotUse)},
{ 24, -1, -1, sizeof(::greptime::v1::CreateFlowTaskExpr)},
{ 39, -1, -1, sizeof(::greptime::v1::SchemaScopedTableName)},
{ 47, -1, -1, sizeof(::greptime::v1::DropFlowTaskExpr)},
{ 55, 63, -1, sizeof(::greptime::v1::CreateTableExpr_TableOptionsEntry_DoNotUse)},
{ 65, -1, -1, sizeof(::greptime::v1::CreateTableExpr)},
{ 82, -1, -1, sizeof(::greptime::v1::AlterExpr)},
{ 95, -1, -1, sizeof(::greptime::v1::DropTableExpr)},
{ 106, 114, -1, sizeof(::greptime::v1::CreateDatabaseExpr_OptionsEntry_DoNotUse)},
{ 116, -1, -1, sizeof(::greptime::v1::CreateDatabaseExpr)},
{ 126, -1, -1, sizeof(::greptime::v1::TruncateTableExpr)},
{ 136, -1, -1, sizeof(::greptime::v1::DropDatabaseExpr)},
{ 145, -1, -1, sizeof(::greptime::v1::AddColumns)},
{ 152, -1, -1, sizeof(::greptime::v1::DropColumns)},
{ 159, -1, -1, sizeof(::greptime::v1::RenameTable)},
{ 166, -1, -1, sizeof(::greptime::v1::AddColumn)},
{ 174, -1, -1, sizeof(::greptime::v1::DropColumn)},
{ 181, -1, -1, sizeof(::greptime::v1::TableId)},
{ 188, -1, -1, sizeof(::greptime::v1::ColumnDef)},
{ 201, -1, -1, sizeof(::greptime::v1::AddColumnLocation)},
{ 40, -1, -1, sizeof(::greptime::v1::SchemaScopedTableName)},
{ 48, -1, -1, sizeof(::greptime::v1::DropFlowTaskExpr)},
{ 56, 64, -1, sizeof(::greptime::v1::CreateTableExpr_TableOptionsEntry_DoNotUse)},
{ 66, -1, -1, sizeof(::greptime::v1::CreateTableExpr)},
{ 83, -1, -1, sizeof(::greptime::v1::AlterExpr)},
{ 96, -1, -1, sizeof(::greptime::v1::DropTableExpr)},
{ 107, 115, -1, sizeof(::greptime::v1::CreateDatabaseExpr_OptionsEntry_DoNotUse)},
{ 117, -1, -1, sizeof(::greptime::v1::CreateDatabaseExpr)},
{ 127, -1, -1, sizeof(::greptime::v1::TruncateTableExpr)},
{ 137, -1, -1, sizeof(::greptime::v1::DropDatabaseExpr)},
{ 146, -1, -1, sizeof(::greptime::v1::AddColumns)},
{ 153, -1, -1, sizeof(::greptime::v1::DropColumns)},
{ 160, -1, -1, sizeof(::greptime::v1::RenameTable)},
{ 167, -1, -1, sizeof(::greptime::v1::AddColumn)},
{ 175, -1, -1, sizeof(::greptime::v1::DropColumn)},
{ 182, -1, -1, sizeof(::greptime::v1::TableId)},
{ 189, -1, -1, sizeof(::greptime::v1::ColumnDef)},
{ 202, -1, -1, sizeof(::greptime::v1::AddColumnLocation)},
};
static const ::_pb::Message* const file_default_instances[] = {
@@ -611,77 +613,78 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT
".TruncateTableExprH\000\022;\n\020create_flow_task"
"\030\010 \001(\0132\037.greptime.v1.CreateFlowTaskExprH"
"\000\0227\n\016drop_flow_task\030\t \001(\0132\035.greptime.v1."
"DropFlowTaskExprH\000B\006\n\004expr\"\207\003\n\022CreateFlo"
"DropFlowTaskExprH\000B\006\n\004expr\"\233\003\n\022CreateFlo"
"wTaskExpr\022\024\n\014catalog_name\030\001 \001(\t\022\021\n\ttask_"
"name\030\002 \001(\t\022>\n\022source_table_names\030\003 \003(\0132\""
".greptime.v1.SchemaScopedTableName\022;\n\017si"
"nk_table_name\030\004 \001(\0132\".greptime.v1.Schema"
"ScopedTableName\022\034\n\024create_if_not_exists\030"
"\005 \001(\010\022\023\n\013expire_when\030\006 \001(\t\022\017\n\007comment\030\007 "
"\001(\t\022\013\n\003sql\030\010 \001(\t\022F\n\014task_options\030\t \003(\01320"
".greptime.v1.CreateFlowTaskExpr.TaskOpti"
"onsEntry\0322\n\020TaskOptionsEntry\022\013\n\003key\030\001 \001("
"\t\022\r\n\005value\030\002 \001(\t:\0028\001\"@\n\025SchemaScopedTabl"
"eName\022\023\n\013schema_name\030\001 \001(\t\022\022\n\ntable_name"
"\030\002 \001(\t\";\n\020DropFlowTaskExpr\022\024\n\014catalog_na"
"me\030\001 \001(\t\022\021\n\ttask_name\030\002 \001(\t\"\207\003\n\017CreateTa"
"bleExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_"
"name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022\014\n\004desc\030\004"
" \001(\t\022+\n\013column_defs\030\005 \003(\0132\026.greptime.v1."
"ColumnDef\022\022\n\ntime_index\030\006 \001(\t\022\024\n\014primary"
"_keys\030\007 \003(\t\022\034\n\024create_if_not_exists\030\010 \001("
"\010\022E\n\rtable_options\030\t \003(\0132..greptime.v1.C"
"reateTableExpr.TableOptionsEntry\022&\n\010tabl"
"e_id\030\n \001(\0132\024.greptime.v1.TableId\022\016\n\006engi"
"ne\030\014 \001(\t\0323\n\021TableOptionsEntry\022\013\n\003key\030\001 \001"
"(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\346\001\n\tAlterExpr\022\024\n\014c"
"atalog_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022"
"\n\ntable_name\030\003 \001(\t\022.\n\013add_columns\030\004 \001(\0132"
"\027.greptime.v1.AddColumnsH\000\0220\n\014drop_colum"
"ns\030\005 \001(\0132\030.greptime.v1.DropColumnsH\000\0220\n\014"
"rename_table\030\006 \001(\0132\030.greptime.v1.RenameT"
"ableH\000B\006\n\004kind\"\216\001\n\rDropTableExpr\022\024\n\014cata"
"log_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\nt"
"able_name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024.grep"
"time.v1.TableId\022\026\n\016drop_if_exists\030\005 \001(\010\""
"\314\001\n\022CreateDatabaseExpr\022\024\n\014catalog_name\030\001"
" \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\034\n\024create_if_n"
"ot_exists\030\003 \001(\010\022=\n\007options\030\004 \003(\0132,.grept"
"ime.v1.CreateDatabaseExpr.OptionsEntry\032."
"\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001"
"(\t:\0028\001\"z\n\021TruncateTableExpr\022\024\n\014catalog_n"
"ScopedTableName\022\022\n\nor_replace\030\005 \001(\010\022\034\n\024c"
"reate_if_not_exists\030\006 \001(\010\022\023\n\013expire_when"
"\030\007 \001(\t\022\017\n\007comment\030\010 \001(\t\022\013\n\003sql\030\t \001(\t\022F\n\014"
"task_options\030\n \003(\01320.greptime.v1.CreateF"
"lowTaskExpr.TaskOptionsEntry\0322\n\020TaskOpti"
"onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001"
"\"@\n\025SchemaScopedTableName\022\023\n\013schema_name"
"\030\001 \001(\t\022\022\n\ntable_name\030\002 \001(\t\";\n\020DropFlowTa"
"skExpr\022\024\n\014catalog_name\030\001 \001(\t\022\021\n\ttask_nam"
"e\030\002 \001(\t\"\207\003\n\017CreateTableExpr\022\024\n\014catalog_n"
"ame\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\ntable_"
"name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024.greptime."
"v1.TableId\"U\n\020DropDatabaseExpr\022\024\n\014catalo"
"g_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\026\n\016dro"
"p_if_exists\030\003 \001(\010\"9\n\nAddColumns\022+\n\013add_c"
"olumns\030\001 \003(\0132\026.greptime.v1.AddColumn\"<\n\013"
"DropColumns\022-\n\014drop_columns\030\001 \003(\0132\027.grep"
"time.v1.DropColumn\"%\n\013RenameTable\022\026\n\016new"
"_table_name\030\001 \001(\t\"i\n\tAddColumn\022*\n\ncolumn"
"_def\030\001 \001(\0132\026.greptime.v1.ColumnDef\0220\n\010lo"
"cation\030\003 \001(\0132\036.greptime.v1.AddColumnLoca"
"tion\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"\025\n\007Tabl"
"eId\022\n\n\002id\030\001 \001(\r\"\377\001\n\tColumnDef\022\014\n\004name\030\001 "
"\001(\t\022.\n\tdata_type\030\002 \001(\0162\033.greptime.v1.Col"
"umnDataType\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022defa"
"ult_constraint\030\004 \001(\014\0220\n\rsemantic_type\030\005 "
"\001(\0162\031.greptime.v1.SemanticType\022\017\n\007commen"
"t\030\006 \001(\t\022@\n\022datatype_extension\030\007 \001(\0132$.gr"
"eptime.v1.ColumnDataTypeExtension\"\230\001\n\021Ad"
"dColumnLocation\022B\n\rlocation_type\030\001 \001(\0162+"
".greptime.v1.AddColumnLocation.LocationT"
"ype\022\031\n\021after_column_name\030\002 \001(\t\"$\n\014Locati"
"onType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001BL\n\016io.grept"
"ime.v1B\003DdlZ5github.com/GreptimeTeam/gre"
"ptime-proto/go/greptime/v1b\006proto3"
"name\030\003 \001(\t\022\014\n\004desc\030\004 \001(\t\022+\n\013column_defs\030"
"\005 \003(\0132\026.greptime.v1.ColumnDef\022\022\n\ntime_in"
"dex\030\006 \001(\t\022\024\n\014primary_keys\030\007 \003(\t\022\034\n\024creat"
"e_if_not_exists\030\010 \001(\010\022E\n\rtable_options\030\t"
" \003(\0132..greptime.v1.CreateTableExpr.Table"
"OptionsEntry\022&\n\010table_id\030\n \001(\0132\024.greptim"
"e.v1.TableId\022\016\n\006engine\030\014 \001(\t\0323\n\021TableOpt"
"ionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028"
"\001\"\346\001\n\tAlterExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n"
"\013schema_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022."
"\n\013add_columns\030\004 \001(\0132\027.greptime.v1.AddCol"
"umnsH\000\0220\n\014drop_columns\030\005 \001(\0132\030.greptime."
"v1.DropColumnsH\000\0220\n\014rename_table\030\006 \001(\0132\030"
".greptime.v1.RenameTableH\000B\006\n\004kind\"\216\001\n\rD"
"ropTableExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013sc"
"hema_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022&\n\010t"
"able_id\030\004 \001(\0132\024.greptime.v1.TableId\022\026\n\016d"
"rop_if_exists\030\005 \001(\010\"\314\001\n\022CreateDatabaseEx"
"pr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_name\030"
"\002 \001(\t\022\034\n\024create_if_not_exists\030\003 \001(\010\022=\n\007o"
"ptions\030\004 \003(\0132,.greptime.v1.CreateDatabas"
"eExpr.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003ke"
"y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"z\n\021TruncateTa"
"bleExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_"
"name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022&\n\010table_"
"id\030\004 \001(\0132\024.greptime.v1.TableId\"U\n\020DropDa"
"tabaseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013sche"
"ma_name\030\002 \001(\t\022\026\n\016drop_if_exists\030\003 \001(\010\"9\n"
"\nAddColumns\022+\n\013add_columns\030\001 \003(\0132\026.grept"
"ime.v1.AddColumn\"<\n\013DropColumns\022-\n\014drop_"
"columns\030\001 \003(\0132\027.greptime.v1.DropColumn\"%"
"\n\013RenameTable\022\026\n\016new_table_name\030\001 \001(\t\"i\n"
"\tAddColumn\022*\n\ncolumn_def\030\001 \001(\0132\026.greptim"
"e.v1.ColumnDef\0220\n\010location\030\003 \001(\0132\036.grept"
"ime.v1.AddColumnLocation\"\032\n\nDropColumn\022\014"
"\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\377\001\n\t"
"ColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata_type\030\002 \001"
"(\0162\033.greptime.v1.ColumnDataType\022\023\n\013is_nu"
"llable\030\003 \001(\010\022\032\n\022default_constraint\030\004 \001(\014"
"\0220\n\rsemantic_type\030\005 \001(\0162\031.greptime.v1.Se"
"manticType\022\017\n\007comment\030\006 \001(\t\022@\n\022datatype_"
"extension\030\007 \001(\0132$.greptime.v1.ColumnData"
"TypeExtension\"\230\001\n\021AddColumnLocation\022B\n\rl"
"ocation_type\030\001 \001(\0162+.greptime.v1.AddColu"
"mnLocation.LocationType\022\031\n\021after_column_"
"name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIRST\020\000\022\t\n"
"\005AFTER\020\001BL\n\016io.greptime.v1B\003DdlZ5github."
"com/GreptimeTeam/greptime-proto/go/grept"
"ime/v1b\006proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fddl_2eproto_deps[1] = {
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
};
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fddl_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fddl_2eproto = {
false, false, 2994, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto,
false, false, 3014, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto,
"greptime/v1/ddl.proto",
&descriptor_table_greptime_2fv1_2fddl_2eproto_once, descriptor_table_greptime_2fv1_2fddl_2eproto_deps, 1, 21,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets,
@@ -1359,6 +1362,7 @@ CreateFlowTaskExpr::CreateFlowTaskExpr(const CreateFlowTaskExpr& from)
, decltype(_impl_.comment_){}
, decltype(_impl_.sql_){}
, decltype(_impl_.sink_table_name_){nullptr}
, decltype(_impl_.or_replace_){}
, decltype(_impl_.create_if_not_exists_){}
, /*decltype(_impl_._cached_size_)*/{}};
@@ -1407,7 +1411,9 @@ CreateFlowTaskExpr::CreateFlowTaskExpr(const CreateFlowTaskExpr& from)
if (from._internal_has_sink_table_name()) {
_this->_impl_.sink_table_name_ = new ::greptime::v1::SchemaScopedTableName(*from._impl_.sink_table_name_);
}
_this->_impl_.create_if_not_exists_ = from._impl_.create_if_not_exists_;
::memcpy(&_impl_.or_replace_, &from._impl_.or_replace_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.create_if_not_exists_) -
reinterpret_cast<char*>(&_impl_.or_replace_)) + sizeof(_impl_.create_if_not_exists_));
// @@protoc_insertion_point(copy_constructor:greptime.v1.CreateFlowTaskExpr)
}
@@ -1424,6 +1430,7 @@ inline void CreateFlowTaskExpr::SharedCtor(
, decltype(_impl_.comment_){}
, decltype(_impl_.sql_){}
, decltype(_impl_.sink_table_name_){nullptr}
, decltype(_impl_.or_replace_){false}
, decltype(_impl_.create_if_not_exists_){false}
, /*decltype(_impl_._cached_size_)*/{}
};
@@ -1497,7 +1504,9 @@ void CreateFlowTaskExpr::Clear() {
delete _impl_.sink_table_name_;
}
_impl_.sink_table_name_ = nullptr;
_impl_.create_if_not_exists_ = false;
::memset(&_impl_.or_replace_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.create_if_not_exists_) -
reinterpret_cast<char*>(&_impl_.or_replace_)) + sizeof(_impl_.create_if_not_exists_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1548,17 +1557,25 @@ const char* CreateFlowTaskExpr::_InternalParse(const char* ptr, ::_pbi::ParseCon
} else
goto handle_unusual;
continue;
// bool create_if_not_exists = 5;
// bool or_replace = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_impl_.or_replace_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// bool create_if_not_exists = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_impl_.create_if_not_exists_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// string expire_when = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
// string expire_when = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
auto str = _internal_mutable_expire_when();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
@@ -1566,9 +1583,9 @@ const char* CreateFlowTaskExpr::_InternalParse(const char* ptr, ::_pbi::ParseCon
} else
goto handle_unusual;
continue;
// string comment = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
// string comment = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
auto str = _internal_mutable_comment();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
@@ -1576,9 +1593,9 @@ const char* CreateFlowTaskExpr::_InternalParse(const char* ptr, ::_pbi::ParseCon
} else
goto handle_unusual;
continue;
// string sql = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
// string sql = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
auto str = _internal_mutable_sql();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
@@ -1586,16 +1603,16 @@ const char* CreateFlowTaskExpr::_InternalParse(const char* ptr, ::_pbi::ParseCon
} else
goto handle_unusual;
continue;
// map<string, string> task_options = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
// map<string, string> task_options = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(&_impl_.task_options_, ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr));
} else
goto handle_unusual;
continue;
@@ -1663,43 +1680,49 @@ uint8_t* CreateFlowTaskExpr::_InternalSerialize(
_Internal::sink_table_name(this).GetCachedSize(), target, stream);
}
// bool create_if_not_exists = 5;
if (this->_internal_create_if_not_exists() != 0) {
// bool or_replace = 5;
if (this->_internal_or_replace() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_create_if_not_exists(), target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_or_replace(), target);
}
// string expire_when = 6;
// bool create_if_not_exists = 6;
if (this->_internal_create_if_not_exists() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_create_if_not_exists(), target);
}
// string expire_when = 7;
if (!this->_internal_expire_when().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_expire_when().data(), static_cast<int>(this->_internal_expire_when().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"greptime.v1.CreateFlowTaskExpr.expire_when");
target = stream->WriteStringMaybeAliased(
6, this->_internal_expire_when(), target);
7, this->_internal_expire_when(), target);
}
// string comment = 7;
// string comment = 8;
if (!this->_internal_comment().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_comment().data(), static_cast<int>(this->_internal_comment().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"greptime.v1.CreateFlowTaskExpr.comment");
target = stream->WriteStringMaybeAliased(
7, this->_internal_comment(), target);
8, this->_internal_comment(), target);
}
// string sql = 8;
// string sql = 9;
if (!this->_internal_sql().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_sql().data(), static_cast<int>(this->_internal_sql().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"greptime.v1.CreateFlowTaskExpr.sql");
target = stream->WriteStringMaybeAliased(
8, this->_internal_sql(), target);
9, this->_internal_sql(), target);
}
// map<string, string> task_options = 9;
// map<string, string> task_options = 10;
if (!this->_internal_task_options().empty()) {
using MapType = ::_pb::Map<std::string, std::string>;
using WireHelper = CreateFlowTaskExpr_TaskOptionsEntry_DoNotUse::Funcs;
@@ -1718,12 +1741,12 @@ uint8_t* CreateFlowTaskExpr::_InternalSerialize(
if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
target = WireHelper::InternalSerialize(9, entry.first, entry.second, target, stream);
target = WireHelper::InternalSerialize(10, entry.first, entry.second, target, stream);
check_utf8(entry);
}
} else {
for (const auto& entry : map_field) {
target = WireHelper::InternalSerialize(9, entry.first, entry.second, target, stream);
target = WireHelper::InternalSerialize(10, entry.first, entry.second, target, stream);
check_utf8(entry);
}
}
@@ -1752,7 +1775,7 @@ size_t CreateFlowTaskExpr::ByteSizeLong() const {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// map<string, string> task_options = 9;
// map<string, string> task_options = 10;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_task_options_size());
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
@@ -1775,21 +1798,21 @@ size_t CreateFlowTaskExpr::ByteSizeLong() const {
this->_internal_task_name());
}
// string expire_when = 6;
// string expire_when = 7;
if (!this->_internal_expire_when().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_expire_when());
}
// string comment = 7;
// string comment = 8;
if (!this->_internal_comment().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_comment());
}
// string sql = 8;
// string sql = 9;
if (!this->_internal_sql().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -1803,7 +1826,12 @@ size_t CreateFlowTaskExpr::ByteSizeLong() const {
*_impl_.sink_table_name_);
}
// bool create_if_not_exists = 5;
// bool or_replace = 5;
if (this->_internal_or_replace() != 0) {
total_size += 1 + 1;
}
// bool create_if_not_exists = 6;
if (this->_internal_create_if_not_exists() != 0) {
total_size += 1 + 1;
}
@@ -1847,6 +1875,9 @@ void CreateFlowTaskExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, con
_this->_internal_mutable_sink_table_name()->::greptime::v1::SchemaScopedTableName::MergeFrom(
from._internal_sink_table_name());
}
if (from._internal_or_replace() != 0) {
_this->_internal_set_or_replace(from._internal_or_replace());
}
if (from._internal_create_if_not_exists() != 0) {
_this->_internal_set_create_if_not_exists(from._internal_create_if_not_exists());
}