feat: change EXPIRE WHEN to EXPIRE AFTER (#170)
* feat: change EXPIRE WHEN to EXPIRE AFTER Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * change expire_after type Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * optional expire after Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
+117
-119
@@ -53,10 +53,10 @@ PROTOBUF_CONSTEXPR CreateFlowExpr::CreateFlowExpr(
|
||||
, /*decltype(_impl_.flow_options_)*/{::_pbi::ConstantInitialized()}
|
||||
, /*decltype(_impl_.catalog_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.flow_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.expire_when_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*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_.expire_after_)*/nullptr
|
||||
, /*decltype(_impl_.or_replace_)*/false
|
||||
, /*decltype(_impl_.create_if_not_exists_)*/false
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
@@ -444,7 +444,7 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowExpr, _impl_.sink_table_name_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowExpr, _impl_.or_replace_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowExpr, _impl_.create_if_not_exists_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowExpr, _impl_.expire_when_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowExpr, _impl_.expire_after_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowExpr, _impl_.comment_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowExpr, _impl_.sql_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateFlowExpr, _impl_.flow_options_),
|
||||
@@ -730,92 +730,93 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT
|
||||
"_flow\030\t \001(\0132\031.greptime.v1.DropFlowExprH\000"
|
||||
"\0222\n\013create_view\030\n \001(\0132\033.greptime.v1.Crea"
|
||||
"teViewExprH\000\022.\n\tdrop_view\030\013 \001(\0132\031.grepti"
|
||||
"me.v1.DropViewExprH\000B\006\n\004expr\"\373\002\n\016CreateF"
|
||||
"me.v1.DropViewExprH\000B\006\n\004expr\"\226\003\n\016CreateF"
|
||||
"lowExpr\022\024\n\014catalog_name\030\001 \001(\t\022\021\n\tflow_na"
|
||||
"me\030\002 \001(\t\0222\n\022source_table_names\030\003 \003(\0132\026.g"
|
||||
"reptime.v1.TableName\022/\n\017sink_table_name\030"
|
||||
"\004 \001(\0132\026.greptime.v1.TableName\022\022\n\nor_repl"
|
||||
"ace\030\005 \001(\010\022\034\n\024create_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\022B\n\014flow_options\030\n \003(\0132,.grept"
|
||||
"ime.v1.CreateFlowExpr.FlowOptionsEntry\0322"
|
||||
"\n\020FlowOptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value"
|
||||
"\030\002 \001(\t:\0028\001\"u\n\014DropFlowExpr\022\024\n\014catalog_na"
|
||||
"me\030\001 \001(\t\022\021\n\tflow_name\030\002 \001(\t\022$\n\007flow_id\030\003"
|
||||
" \001(\0132\023.greptime.v1.FlowId\022\026\n\016drop_if_exi"
|
||||
"sts\030\005 \001(\010\"\226\001\n\016CreateViewExpr\022\024\n\014catalog_"
|
||||
"name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\021\n\tview_"
|
||||
"name\030\003 \001(\t\022\024\n\014logical_plan\030\004 \001(\014\022\034\n\024crea"
|
||||
"te_if_not_exists\030\005 \001(\010\022\022\n\nor_replace\030\006 \001"
|
||||
"(\010\"\213\001\n\014DropViewExpr\022\024\n\014catalog_name\030\001 \001("
|
||||
"\t\022\023\n\013schema_name\030\002 \001(\t\022\021\n\tview_name\030\003 \001("
|
||||
"\t\022%\n\007view_id\030\004 \001(\0132\024.greptime.v1.TableId"
|
||||
"\022\026\n\016drop_if_exists\030\005 \001(\010\"\207\003\n\017CreateTable"
|
||||
"Expr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_nam"
|
||||
"e\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.Col"
|
||||
"umnDef\022\022\n\ntime_index\030\006 \001(\t\022\024\n\014primary_ke"
|
||||
"ys\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.Crea"
|
||||
"teTableExpr.TableOptionsEntry\022&\n\010table_i"
|
||||
"d\030\n \001(\0132\024.greptime.v1.TableId\022\016\n\006engine\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\"\245\002\n\tAlterExpr\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\013add_columns\030\004 \001(\0132\027.g"
|
||||
"reptime.v1.AddColumnsH\000\0220\n\014drop_columns\030"
|
||||
"\005 \001(\0132\030.greptime.v1.DropColumnsH\000\0220\n\014ren"
|
||||
"ame_table\030\006 \001(\0132\030.greptime.v1.RenameTabl"
|
||||
"eH\000\022=\n\023change_column_types\030\007 \001(\0132\036.grept"
|
||||
"ime.v1.ChangeColumnTypesH\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\"O"
|
||||
"\n\021ChangeColumnTypes\022:\n\023change_column_typ"
|
||||
"es\030\001 \003(\0132\035.greptime.v1.ChangeColumnType\""
|
||||
"%\n\013RenameTable\022\026\n\016new_table_name\030\001 \001(\t\"i"
|
||||
"\n\tAddColumn\022*\n\ncolumn_def\030\001 \001(\0132\026.grepti"
|
||||
"me.v1.ColumnDef\0220\n\010location\030\003 \001(\0132\036.grep"
|
||||
"time.v1.AddColumnLocation\"\236\001\n\020ChangeColu"
|
||||
"mnType\022\023\n\013column_name\030\001 \001(\t\0220\n\013target_ty"
|
||||
"pe\030\002 \001(\0162\033.greptime.v1.ColumnDataType\022C\n"
|
||||
"\025target_type_extension\030\003 \001(\0132$.greptime."
|
||||
"v1.ColumnDataTypeExtension\"\032\n\nDropColumn"
|
||||
"\022\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\024\n"
|
||||
"\006FlowId\022\n\n\002id\030\001 \001(\r\"\377\001\n\tColumnDef\022\014\n\004nam"
|
||||
"e\030\001 \001(\t\022.\n\tdata_type\030\002 \001(\0162\033.greptime.v1"
|
||||
".ColumnDataType\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022"
|
||||
"default_constraint\030\004 \001(\014\0220\n\rsemantic_typ"
|
||||
"e\030\005 \001(\0162\031.greptime.v1.SemanticType\022\017\n\007co"
|
||||
"mment\030\006 \001(\t\022@\n\022datatype_extension\030\007 \001(\0132"
|
||||
"$.greptime.v1.ColumnDataTypeExtension\"\230\001"
|
||||
"\n\021AddColumnLocation\022B\n\rlocation_type\030\001 \001"
|
||||
"(\0162+.greptime.v1.AddColumnLocation.Locat"
|
||||
"ionType\022\031\n\021after_column_name\030\002 \001(\t\"$\n\014Lo"
|
||||
"cationType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001BL\n\016io.g"
|
||||
"reptime.v1B\003DdlZ5github.com/GreptimeTeam"
|
||||
"/greptime-proto/go/greptime/v1b\006proto3"
|
||||
".\n\014expire_after\030\007 \001(\0132\030.greptime.v1.Expi"
|
||||
"reAfter\022\017\n\007comment\030\010 \001(\t\022\013\n\003sql\030\t \001(\t\022B\n"
|
||||
"\014flow_options\030\n \003(\0132,.greptime.v1.Create"
|
||||
"FlowExpr.FlowOptionsEntry\0322\n\020FlowOptions"
|
||||
"Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"u\n"
|
||||
"\014DropFlowExpr\022\024\n\014catalog_name\030\001 \001(\t\022\021\n\tf"
|
||||
"low_name\030\002 \001(\t\022$\n\007flow_id\030\003 \001(\0132\023.grepti"
|
||||
"me.v1.FlowId\022\026\n\016drop_if_exists\030\005 \001(\010\"\226\001\n"
|
||||
"\016CreateViewExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n"
|
||||
"\013schema_name\030\002 \001(\t\022\021\n\tview_name\030\003 \001(\t\022\024\n"
|
||||
"\014logical_plan\030\004 \001(\014\022\034\n\024create_if_not_exi"
|
||||
"sts\030\005 \001(\010\022\022\n\nor_replace\030\006 \001(\010\"\213\001\n\014DropVi"
|
||||
"ewExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_n"
|
||||
"ame\030\002 \001(\t\022\021\n\tview_name\030\003 \001(\t\022%\n\007view_id\030"
|
||||
"\004 \001(\0132\024.greptime.v1.TableId\022\026\n\016drop_if_e"
|
||||
"xists\030\005 \001(\010\"\207\003\n\017CreateTableExpr\022\024\n\014catal"
|
||||
"og_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\nta"
|
||||
"ble_name\030\003 \001(\t\022\014\n\004desc\030\004 \001(\t\022+\n\013column_d"
|
||||
"efs\030\005 \003(\0132\026.greptime.v1.ColumnDef\022\022\n\ntim"
|
||||
"e_index\030\006 \001(\t\022\024\n\014primary_keys\030\007 \003(\t\022\034\n\024c"
|
||||
"reate_if_not_exists\030\010 \001(\010\022E\n\rtable_optio"
|
||||
"ns\030\t \003(\0132..greptime.v1.CreateTableExpr.T"
|
||||
"ableOptionsEntry\022&\n\010table_id\030\n \001(\0132\024.gre"
|
||||
"ptime.v1.TableId\022\016\n\006engine\030\014 \001(\t\0323\n\021Tabl"
|
||||
"eOptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001("
|
||||
"\t:\0028\001\"\245\002\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.Ad"
|
||||
"dColumnsH\000\0220\n\014drop_columns\030\005 \001(\0132\030.grept"
|
||||
"ime.v1.DropColumnsH\000\0220\n\014rename_table\030\006 \001"
|
||||
"(\0132\030.greptime.v1.RenameTableH\000\022=\n\023change"
|
||||
"_column_types\030\007 \001(\0132\036.greptime.v1.Change"
|
||||
"ColumnTypesH\000B\006\n\004kind\"\216\001\n\rDropTableExpr\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(\013"
|
||||
"2\024.greptime.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\024crea"
|
||||
"te_if_not_exists\030\003 \001(\010\022=\n\007options\030\004 \003(\0132"
|
||||
",.greptime.v1.CreateDatabaseExpr.Options"
|
||||
"Entry\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va"
|
||||
"lue\030\002 \001(\t:\0028\001\"z\n\021TruncateTableExpr\022\024\n\014ca"
|
||||
"talog_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.gr"
|
||||
"eptime.v1.TableId\"U\n\020DropDatabaseExpr\022\024\n"
|
||||
"\014catalog_name\030\001 \001(\t\022\023\n\013schema_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.greptime.v1.AddCol"
|
||||
"umn\"<\n\013DropColumns\022-\n\014drop_columns\030\001 \003(\013"
|
||||
"2\027.greptime.v1.DropColumn\"O\n\021ChangeColum"
|
||||
"nTypes\022:\n\023change_column_types\030\001 \003(\0132\035.gr"
|
||||
"eptime.v1.ChangeColumnType\"%\n\013RenameTabl"
|
||||
"e\022\026\n\016new_table_name\030\001 \001(\t\"i\n\tAddColumn\022*"
|
||||
"\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.ColumnD"
|
||||
"ef\0220\n\010location\030\003 \001(\0132\036.greptime.v1.AddCo"
|
||||
"lumnLocation\"\236\001\n\020ChangeColumnType\022\023\n\013col"
|
||||
"umn_name\030\001 \001(\t\0220\n\013target_type\030\002 \001(\0162\033.gr"
|
||||
"eptime.v1.ColumnDataType\022C\n\025target_type_"
|
||||
"extension\030\003 \001(\0132$.greptime.v1.ColumnData"
|
||||
"TypeExtension\"\032\n\nDropColumn\022\014\n\004name\030\001 \001("
|
||||
"\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\024\n\006FlowId\022\n\n\002id"
|
||||
"\030\001 \001(\r\"\377\001\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tda"
|
||||
"ta_type\030\002 \001(\0162\033.greptime.v1.ColumnDataTy"
|
||||
"pe\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022default_const"
|
||||
"raint\030\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\0162\031.gre"
|
||||
"ptime.v1.SemanticType\022\017\n\007comment\030\006 \001(\t\022@"
|
||||
"\n\022datatype_extension\030\007 \001(\0132$.greptime.v1"
|
||||
".ColumnDataTypeExtension\"\230\001\n\021AddColumnLo"
|
||||
"cation\022B\n\rlocation_type\030\001 \001(\0162+.greptime"
|
||||
".v1.AddColumnLocation.LocationType\022\031\n\021af"
|
||||
"ter_column_name\030\002 \001(\t\"$\n\014LocationType\022\t\n"
|
||||
"\005FIRST\020\000\022\t\n\005AFTER\020\001BL\n\016io.greptime.v1B\003D"
|
||||
"dlZ5github.com/GreptimeTeam/greptime-pro"
|
||||
"to/go/greptime/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, 3678, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto,
|
||||
false, false, 3705, 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, 25,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets,
|
||||
@@ -1582,12 +1583,17 @@ void CreateFlowExpr_FlowOptionsEntry_DoNotUse::MergeFrom(const CreateFlowExpr_Fl
|
||||
class CreateFlowExpr::_Internal {
|
||||
public:
|
||||
static const ::greptime::v1::TableName& sink_table_name(const CreateFlowExpr* msg);
|
||||
static const ::greptime::v1::ExpireAfter& expire_after(const CreateFlowExpr* msg);
|
||||
};
|
||||
|
||||
const ::greptime::v1::TableName&
|
||||
CreateFlowExpr::_Internal::sink_table_name(const CreateFlowExpr* msg) {
|
||||
return *msg->_impl_.sink_table_name_;
|
||||
}
|
||||
const ::greptime::v1::ExpireAfter&
|
||||
CreateFlowExpr::_Internal::expire_after(const CreateFlowExpr* msg) {
|
||||
return *msg->_impl_.expire_after_;
|
||||
}
|
||||
void CreateFlowExpr::clear_source_table_names() {
|
||||
_impl_.source_table_names_.Clear();
|
||||
}
|
||||
@@ -1597,6 +1603,12 @@ void CreateFlowExpr::clear_sink_table_name() {
|
||||
}
|
||||
_impl_.sink_table_name_ = nullptr;
|
||||
}
|
||||
void CreateFlowExpr::clear_expire_after() {
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.expire_after_ != nullptr) {
|
||||
delete _impl_.expire_after_;
|
||||
}
|
||||
_impl_.expire_after_ = nullptr;
|
||||
}
|
||||
CreateFlowExpr::CreateFlowExpr(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
||||
@@ -1614,10 +1626,10 @@ CreateFlowExpr::CreateFlowExpr(const CreateFlowExpr& from)
|
||||
, /*decltype(_impl_.flow_options_)*/{}
|
||||
, decltype(_impl_.catalog_name_){}
|
||||
, decltype(_impl_.flow_name_){}
|
||||
, decltype(_impl_.expire_when_){}
|
||||
, decltype(_impl_.comment_){}
|
||||
, decltype(_impl_.sql_){}
|
||||
, decltype(_impl_.sink_table_name_){nullptr}
|
||||
, decltype(_impl_.expire_after_){nullptr}
|
||||
, decltype(_impl_.or_replace_){}
|
||||
, decltype(_impl_.create_if_not_exists_){}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
@@ -1640,14 +1652,6 @@ CreateFlowExpr::CreateFlowExpr(const CreateFlowExpr& from)
|
||||
_this->_impl_.flow_name_.Set(from._internal_flow_name(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
_impl_.expire_when_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.expire_when_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (!from._internal_expire_when().empty()) {
|
||||
_this->_impl_.expire_when_.Set(from._internal_expire_when(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
_impl_.comment_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.comment_.Set("", GetArenaForAllocation());
|
||||
@@ -1667,6 +1671,9 @@ CreateFlowExpr::CreateFlowExpr(const CreateFlowExpr& from)
|
||||
if (from._internal_has_sink_table_name()) {
|
||||
_this->_impl_.sink_table_name_ = new ::greptime::v1::TableName(*from._impl_.sink_table_name_);
|
||||
}
|
||||
if (from._internal_has_expire_after()) {
|
||||
_this->_impl_.expire_after_ = new ::greptime::v1::ExpireAfter(*from._impl_.expire_after_);
|
||||
}
|
||||
::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_));
|
||||
@@ -1682,10 +1689,10 @@ inline void CreateFlowExpr::SharedCtor(
|
||||
, /*decltype(_impl_.flow_options_)*/{::_pbi::ArenaInitialized(), arena}
|
||||
, decltype(_impl_.catalog_name_){}
|
||||
, decltype(_impl_.flow_name_){}
|
||||
, decltype(_impl_.expire_when_){}
|
||||
, decltype(_impl_.comment_){}
|
||||
, decltype(_impl_.sql_){}
|
||||
, decltype(_impl_.sink_table_name_){nullptr}
|
||||
, decltype(_impl_.expire_after_){nullptr}
|
||||
, decltype(_impl_.or_replace_){false}
|
||||
, decltype(_impl_.create_if_not_exists_){false}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
@@ -1698,10 +1705,6 @@ inline void CreateFlowExpr::SharedCtor(
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.flow_name_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.expire_when_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.expire_when_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.comment_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.comment_.Set("", GetArenaForAllocation());
|
||||
@@ -1729,10 +1732,10 @@ inline void CreateFlowExpr::SharedDtor() {
|
||||
_impl_.flow_options_.~MapField();
|
||||
_impl_.catalog_name_.Destroy();
|
||||
_impl_.flow_name_.Destroy();
|
||||
_impl_.expire_when_.Destroy();
|
||||
_impl_.comment_.Destroy();
|
||||
_impl_.sql_.Destroy();
|
||||
if (this != internal_default_instance()) delete _impl_.sink_table_name_;
|
||||
if (this != internal_default_instance()) delete _impl_.expire_after_;
|
||||
}
|
||||
|
||||
void CreateFlowExpr::ArenaDtor(void* object) {
|
||||
@@ -1753,13 +1756,16 @@ void CreateFlowExpr::Clear() {
|
||||
_impl_.flow_options_.Clear();
|
||||
_impl_.catalog_name_.ClearToEmpty();
|
||||
_impl_.flow_name_.ClearToEmpty();
|
||||
_impl_.expire_when_.ClearToEmpty();
|
||||
_impl_.comment_.ClearToEmpty();
|
||||
_impl_.sql_.ClearToEmpty();
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.sink_table_name_ != nullptr) {
|
||||
delete _impl_.sink_table_name_;
|
||||
}
|
||||
_impl_.sink_table_name_ = nullptr;
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.expire_after_ != nullptr) {
|
||||
delete _impl_.expire_after_;
|
||||
}
|
||||
_impl_.expire_after_ = nullptr;
|
||||
::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_));
|
||||
@@ -1829,13 +1835,11 @@ const char* CreateFlowExpr::_InternalParse(const char* ptr, ::_pbi::ParseContext
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// string expire_when = 7;
|
||||
// .greptime.v1.ExpireAfter expire_after = 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);
|
||||
ptr = ctx->ParseMessage(_internal_mutable_expire_after(), ptr);
|
||||
CHK_(ptr);
|
||||
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.CreateFlowExpr.expire_when"));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
@@ -1948,14 +1952,11 @@ uint8_t* CreateFlowExpr::_InternalSerialize(
|
||||
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.CreateFlowExpr.expire_when");
|
||||
target = stream->WriteStringMaybeAliased(
|
||||
7, this->_internal_expire_when(), target);
|
||||
// .greptime.v1.ExpireAfter expire_after = 7;
|
||||
if (this->_internal_has_expire_after()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||
InternalWriteMessage(7, _Internal::expire_after(this),
|
||||
_Internal::expire_after(this).GetCachedSize(), target, stream);
|
||||
}
|
||||
|
||||
// string comment = 8;
|
||||
@@ -2054,13 +2055,6 @@ size_t CreateFlowExpr::ByteSizeLong() const {
|
||||
this->_internal_flow_name());
|
||||
}
|
||||
|
||||
// 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 = 8;
|
||||
if (!this->_internal_comment().empty()) {
|
||||
total_size += 1 +
|
||||
@@ -2082,6 +2076,13 @@ size_t CreateFlowExpr::ByteSizeLong() const {
|
||||
*_impl_.sink_table_name_);
|
||||
}
|
||||
|
||||
// .greptime.v1.ExpireAfter expire_after = 7;
|
||||
if (this->_internal_has_expire_after()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||
*_impl_.expire_after_);
|
||||
}
|
||||
|
||||
// bool or_replace = 5;
|
||||
if (this->_internal_or_replace() != 0) {
|
||||
total_size += 1 + 1;
|
||||
@@ -2118,9 +2119,6 @@ void CreateFlowExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :
|
||||
if (!from._internal_flow_name().empty()) {
|
||||
_this->_internal_set_flow_name(from._internal_flow_name());
|
||||
}
|
||||
if (!from._internal_expire_when().empty()) {
|
||||
_this->_internal_set_expire_when(from._internal_expire_when());
|
||||
}
|
||||
if (!from._internal_comment().empty()) {
|
||||
_this->_internal_set_comment(from._internal_comment());
|
||||
}
|
||||
@@ -2131,6 +2129,10 @@ void CreateFlowExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :
|
||||
_this->_internal_mutable_sink_table_name()->::greptime::v1::TableName::MergeFrom(
|
||||
from._internal_sink_table_name());
|
||||
}
|
||||
if (from._internal_has_expire_after()) {
|
||||
_this->_internal_mutable_expire_after()->::greptime::v1::ExpireAfter::MergeFrom(
|
||||
from._internal_expire_after());
|
||||
}
|
||||
if (from._internal_or_replace() != 0) {
|
||||
_this->_internal_set_or_replace(from._internal_or_replace());
|
||||
}
|
||||
@@ -2166,10 +2168,6 @@ void CreateFlowExpr::InternalSwap(CreateFlowExpr* other) {
|
||||
&_impl_.flow_name_, lhs_arena,
|
||||
&other->_impl_.flow_name_, rhs_arena
|
||||
);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||
&_impl_.expire_when_, lhs_arena,
|
||||
&other->_impl_.expire_when_, rhs_arena
|
||||
);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||
&_impl_.comment_, lhs_arena,
|
||||
&other->_impl_.comment_, rhs_arena
|
||||
|
||||
Reference in New Issue
Block a user