feat: truncate request by time ranges (#262)
* feat: truncate request by time ranges Signed-off-by: discord9 <discord9@163.com> * fix: default time unit is millisecond Signed-off-by: discord9 <discord9@163.com> * refactor: per review Signed-off-by: discord9 <discord9@163.com> * add time ranges to truncate table expr Signed-off-by: discord9 <discord9@163.com> * chore: make all Signed-off-by: discord9 <discord9@163.com> * chore: fmt Signed-off-by: discord9 <discord9@163.com> * chore: make all Signed-off-by: discord9 <discord9@163.com> * chore: make all Signed-off-by: discord9 <discord9@163.com> --------- Signed-off-by: discord9 <discord9@163.com>
This commit is contained in:
+173
-118
@@ -306,6 +306,7 @@ PROTOBUF_CONSTEXPR TruncateTableExpr::TruncateTableExpr(
|
||||
, /*decltype(_impl_.schema_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.table_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.table_id_)*/nullptr
|
||||
, /*decltype(_impl_.time_ranges_)*/nullptr
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct TruncateTableExprDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR TruncateTableExprDefaultTypeInternal()
|
||||
@@ -1005,6 +1006,7 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::TruncateTableExpr, _impl_.schema_name_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::TruncateTableExpr, _impl_.table_name_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::TruncateTableExpr, _impl_.table_id_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::TruncateTableExpr, _impl_.time_ranges_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::DropDatabaseExpr, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
@@ -1307,39 +1309,39 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
|
||||
{ 189, 197, -1, sizeof(::greptime::v1::CreateDatabaseExpr_OptionsEntry_DoNotUse)},
|
||||
{ 199, -1, -1, sizeof(::greptime::v1::CreateDatabaseExpr)},
|
||||
{ 209, -1, -1, sizeof(::greptime::v1::TruncateTableExpr)},
|
||||
{ 219, -1, -1, sizeof(::greptime::v1::DropDatabaseExpr)},
|
||||
{ 228, -1, -1, sizeof(::greptime::v1::AddColumns)},
|
||||
{ 235, -1, -1, sizeof(::greptime::v1::DropDefaults)},
|
||||
{ 242, -1, -1, sizeof(::greptime::v1::SetDefaults)},
|
||||
{ 249, -1, -1, sizeof(::greptime::v1::DropColumns)},
|
||||
{ 256, -1, -1, sizeof(::greptime::v1::ModifyColumnTypes)},
|
||||
{ 263, -1, -1, sizeof(::greptime::v1::RenameTable)},
|
||||
{ 270, -1, -1, sizeof(::greptime::v1::AddColumn)},
|
||||
{ 279, -1, -1, sizeof(::greptime::v1::ModifyColumnType)},
|
||||
{ 288, -1, -1, sizeof(::greptime::v1::Option)},
|
||||
{ 296, -1, -1, sizeof(::greptime::v1::SetTableOptions)},
|
||||
{ 303, -1, -1, sizeof(::greptime::v1::UnsetTableOptions)},
|
||||
{ 310, -1, -1, sizeof(::greptime::v1::DropColumn)},
|
||||
{ 317, -1, -1, sizeof(::greptime::v1::TableId)},
|
||||
{ 324, -1, -1, sizeof(::greptime::v1::FlowId)},
|
||||
{ 331, -1, -1, sizeof(::greptime::v1::ColumnDef)},
|
||||
{ 345, -1, -1, sizeof(::greptime::v1::AddColumnLocation)},
|
||||
{ 353, -1, -1, sizeof(::greptime::v1::SetFulltext)},
|
||||
{ 366, -1, -1, sizeof(::greptime::v1::UnsetFulltext)},
|
||||
{ 373, -1, -1, sizeof(::greptime::v1::SetInverted)},
|
||||
{ 380, -1, -1, sizeof(::greptime::v1::UnsetInverted)},
|
||||
{ 387, -1, -1, sizeof(::greptime::v1::SetSkipping)},
|
||||
{ 398, -1, -1, sizeof(::greptime::v1::UnsetSkipping)},
|
||||
{ 405, -1, -1, sizeof(::greptime::v1::AlterDatabaseExpr)},
|
||||
{ 416, -1, -1, sizeof(::greptime::v1::SetDatabaseOptions)},
|
||||
{ 423, -1, -1, sizeof(::greptime::v1::UnsetDatabaseOptions)},
|
||||
{ 430, 438, -1, sizeof(::greptime::v1::CreateTriggerExpr_LabelsEntry_DoNotUse)},
|
||||
{ 440, 448, -1, sizeof(::greptime::v1::CreateTriggerExpr_AnnotationsEntry_DoNotUse)},
|
||||
{ 450, -1, -1, sizeof(::greptime::v1::CreateTriggerExpr)},
|
||||
{ 464, -1, -1, sizeof(::greptime::v1::NotifyChannel)},
|
||||
{ 473, 481, -1, sizeof(::greptime::v1::WebhookOptions_OptsEntry_DoNotUse)},
|
||||
{ 483, -1, -1, sizeof(::greptime::v1::WebhookOptions)},
|
||||
{ 491, -1, -1, sizeof(::greptime::v1::DropTriggerExpr)},
|
||||
{ 220, -1, -1, sizeof(::greptime::v1::DropDatabaseExpr)},
|
||||
{ 229, -1, -1, sizeof(::greptime::v1::AddColumns)},
|
||||
{ 236, -1, -1, sizeof(::greptime::v1::DropDefaults)},
|
||||
{ 243, -1, -1, sizeof(::greptime::v1::SetDefaults)},
|
||||
{ 250, -1, -1, sizeof(::greptime::v1::DropColumns)},
|
||||
{ 257, -1, -1, sizeof(::greptime::v1::ModifyColumnTypes)},
|
||||
{ 264, -1, -1, sizeof(::greptime::v1::RenameTable)},
|
||||
{ 271, -1, -1, sizeof(::greptime::v1::AddColumn)},
|
||||
{ 280, -1, -1, sizeof(::greptime::v1::ModifyColumnType)},
|
||||
{ 289, -1, -1, sizeof(::greptime::v1::Option)},
|
||||
{ 297, -1, -1, sizeof(::greptime::v1::SetTableOptions)},
|
||||
{ 304, -1, -1, sizeof(::greptime::v1::UnsetTableOptions)},
|
||||
{ 311, -1, -1, sizeof(::greptime::v1::DropColumn)},
|
||||
{ 318, -1, -1, sizeof(::greptime::v1::TableId)},
|
||||
{ 325, -1, -1, sizeof(::greptime::v1::FlowId)},
|
||||
{ 332, -1, -1, sizeof(::greptime::v1::ColumnDef)},
|
||||
{ 346, -1, -1, sizeof(::greptime::v1::AddColumnLocation)},
|
||||
{ 354, -1, -1, sizeof(::greptime::v1::SetFulltext)},
|
||||
{ 367, -1, -1, sizeof(::greptime::v1::UnsetFulltext)},
|
||||
{ 374, -1, -1, sizeof(::greptime::v1::SetInverted)},
|
||||
{ 381, -1, -1, sizeof(::greptime::v1::UnsetInverted)},
|
||||
{ 388, -1, -1, sizeof(::greptime::v1::SetSkipping)},
|
||||
{ 399, -1, -1, sizeof(::greptime::v1::UnsetSkipping)},
|
||||
{ 406, -1, -1, sizeof(::greptime::v1::AlterDatabaseExpr)},
|
||||
{ 417, -1, -1, sizeof(::greptime::v1::SetDatabaseOptions)},
|
||||
{ 424, -1, -1, sizeof(::greptime::v1::UnsetDatabaseOptions)},
|
||||
{ 431, 439, -1, sizeof(::greptime::v1::CreateTriggerExpr_LabelsEntry_DoNotUse)},
|
||||
{ 441, 449, -1, sizeof(::greptime::v1::CreateTriggerExpr_AnnotationsEntry_DoNotUse)},
|
||||
{ 451, -1, -1, sizeof(::greptime::v1::CreateTriggerExpr)},
|
||||
{ 465, -1, -1, sizeof(::greptime::v1::NotifyChannel)},
|
||||
{ 474, 482, -1, sizeof(::greptime::v1::WebhookOptions_OptsEntry_DoNotUse)},
|
||||
{ 484, -1, -1, sizeof(::greptime::v1::WebhookOptions)},
|
||||
{ 492, -1, -1, sizeof(::greptime::v1::DropTriggerExpr)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@@ -1487,96 +1489,97 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT
|
||||
"sts\030\003 \001(\010\022=\n\007options\030\004 \003(\0132,.greptime.v1"
|
||||
".CreateDatabaseExpr.OptionsEntry\032.\n\014Opti"
|
||||
"onsEntry\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_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.Tab"
|
||||
"leId\"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_e"
|
||||
"xists\030\003 \001(\010\"9\n\nAddColumns\022+\n\013add_columns"
|
||||
"\030\001 \003(\0132\026.greptime.v1.AddColumn\"\?\n\014DropDe"
|
||||
"faults\022/\n\rdrop_defaults\030\001 \003(\0132\030.greptime"
|
||||
".v1.DropDefault\"<\n\013SetDefaults\022-\n\014set_de"
|
||||
"faults\030\001 \003(\0132\027.greptime.v1.SetDefault\"<\n"
|
||||
"\013DropColumns\022-\n\014drop_columns\030\001 \003(\0132\027.gre"
|
||||
"ptime.v1.DropColumn\"O\n\021ModifyColumnTypes"
|
||||
"\022:\n\023modify_column_types\030\001 \003(\0132\035.greptime"
|
||||
".v1.ModifyColumnType\"%\n\013RenameTable\022\026\n\016n"
|
||||
"ew_table_name\030\001 \001(\t\"\204\001\n\tAddColumn\022*\n\ncol"
|
||||
"umn_def\030\001 \001(\0132\026.greptime.v1.ColumnDef\0220\n"
|
||||
"\010location\030\003 \001(\0132\036.greptime.v1.AddColumnL"
|
||||
"ocation\022\031\n\021add_if_not_exists\030\004 \001(\010\"\236\001\n\020M"
|
||||
"odifyColumnType\022\023\n\013column_name\030\001 \001(\t\0220\n\013"
|
||||
"target_type\030\002 \001(\0162\033.greptime.v1.ColumnDa"
|
||||
"taType\022C\n\025target_type_extension\030\003 \001(\0132$."
|
||||
"greptime.v1.ColumnDataTypeExtension\"$\n\006O"
|
||||
"ption\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"=\n\017Set"
|
||||
"TableOptions\022*\n\rtable_options\030\001 \003(\0132\023.gr"
|
||||
"eptime.v1.Option\"!\n\021UnsetTableOptions\022\014\n"
|
||||
"\004keys\030\001 \003(\t\"\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\"\254\002\n\tColumnDef\022\014\n\004name\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\022default_constra"
|
||||
"int\030\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\0162\031.grept"
|
||||
"ime.v1.SemanticType\022\017\n\007comment\030\006 \001(\t\022@\n\022"
|
||||
"datatype_extension\030\007 \001(\0132$.greptime.v1.C"
|
||||
"olumnDataTypeExtension\022+\n\007options\030\010 \001(\0132"
|
||||
"\032.greptime.v1.ColumnOptions\"\230\001\n\021AddColum"
|
||||
"nLocation\022B\n\rlocation_type\030\001 \001(\0162+.grept"
|
||||
"ime.v1.AddColumnLocation.LocationType\022\031\n"
|
||||
"\021after_column_name\030\002 \001(\t\"$\n\014LocationType"
|
||||
"\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001\"\324\001\n\013SetFulltext\022\023"
|
||||
"\n\013column_name\030\001 \001(\t\022\016\n\006enable\030\002 \001(\010\022\'\n\010a"
|
||||
"nalyzer\030\003 \001(\0162\025.greptime.v1.Analyzer\022\026\n\016"
|
||||
"case_sensitive\030\004 \001(\010\022-\n\007backend\030\005 \001(\0162\034."
|
||||
"greptime.v1.FulltextBackend\022\023\n\013granulari"
|
||||
"ty\030\006 \001(\004\022\033\n\023false_positive_rate\030\007 \001(\001\"$\n"
|
||||
"\rUnsetFulltext\022\023\n\013column_name\030\001 \001(\t\"\"\n\013S"
|
||||
"etInverted\022\023\n\013column_name\030\001 \001(\t\"$\n\rUnset"
|
||||
"Inverted\022\023\n\013column_name\030\001 \001(\t\"\241\001\n\013SetSki"
|
||||
"pping\022\023\n\013column_name\030\001 \001(\t\022\016\n\006enable\030\002 \001"
|
||||
"(\010\022\023\n\013granularity\030\003 \001(\004\022;\n\023skipping_inde"
|
||||
"x_type\030\004 \001(\0162\036.greptime.v1.SkippingIndex"
|
||||
"Type\022\033\n\023false_positive_rate\030\005 \001(\001\"$\n\rUns"
|
||||
"etSkipping\022\023\n\013column_name\030\001 \001(\t\"\314\001\n\021Alte"
|
||||
"rDatabaseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013s"
|
||||
"chema_name\030\002 \001(\t\022\?\n\024set_database_options"
|
||||
"\030\003 \001(\0132\037.greptime.v1.SetDatabaseOptionsH"
|
||||
"\000\022C\n\026unset_database_options\030\004 \001(\0132!.grep"
|
||||
"time.v1.UnsetDatabaseOptionsH\000B\006\n\004kind\"G"
|
||||
"\n\022SetDatabaseOptions\0221\n\024set_database_opt"
|
||||
"ions\030\001 \003(\0132\023.greptime.v1.Option\"$\n\024Unset"
|
||||
"DatabaseOptions\022\014\n\004keys\030\001 \003(\t\"\217\003\n\021Create"
|
||||
"TriggerExpr\022\024\n\014catalog_name\030\001 \001(\t\022\024\n\014tri"
|
||||
"gger_name\030\002 \001(\t\022\034\n\024create_if_not_exists\030"
|
||||
"\003 \001(\010\022\013\n\003sql\030\004 \001(\t\022,\n\010channels\030\005 \003(\0132\032.g"
|
||||
"reptime.v1.NotifyChannel\022:\n\006labels\030\006 \003(\013"
|
||||
"2*.greptime.v1.CreateTriggerExpr.LabelsE"
|
||||
"ntry\022D\n\013annotations\030\007 \003(\0132/.greptime.v1."
|
||||
"CreateTriggerExpr.AnnotationsEntry\022\020\n\010in"
|
||||
"terval\030\010 \001(\004\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t"
|
||||
"\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020AnnotationsEntry\022"
|
||||
"\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"]\n\rNotif"
|
||||
"yChannel\022\014\n\004name\030\001 \001(\t\022.\n\007webhook\030\002 \001(\0132"
|
||||
"\033.greptime.v1.WebhookOptionsH\000B\016\n\014channe"
|
||||
"l_type\"\177\n\016WebhookOptions\022\013\n\003url\030\001 \001(\t\0223\n"
|
||||
"\004opts\030\002 \003(\0132%.greptime.v1.WebhookOptions"
|
||||
".OptsEntry\032+\n\tOptsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005"
|
||||
"value\030\002 \001(\t:\0028\001\"U\n\017DropTriggerExpr\022\024\n\014ca"
|
||||
"talog_name\030\001 \001(\t\022\024\n\014trigger_name\030\002 \001(\t\022\026"
|
||||
"\n\016drop_if_exists\030\003 \001(\010*$\n\010Analyzer\022\013\n\007EN"
|
||||
"GLISH\020\000\022\013\n\007CHINESE\020\001*)\n\017FulltextBackend\022"
|
||||
"\013\n\007TANTIVY\020\000\022\t\n\005BLOOM\020\001*%\n\021SkippingIndex"
|
||||
"Type\022\020\n\014BLOOM_FILTER\020\000BL\n\016io.greptime.v1"
|
||||
"B\003DdlZ5github.com/GreptimeTeam/greptime-"
|
||||
"proto/go/greptime/v1b\006proto3"
|
||||
"\"\250\001\n\021TruncateTableExpr\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.Ta"
|
||||
"bleId\022,\n\013time_ranges\030\005 \001(\0132\027.greptime.v1"
|
||||
".TimeRanges\"U\n\020DropDatabaseExpr\022\024\n\014catal"
|
||||
"og_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\026\n\016dr"
|
||||
"op_if_exists\030\003 \001(\010\"9\n\nAddColumns\022+\n\013add_"
|
||||
"columns\030\001 \003(\0132\026.greptime.v1.AddColumn\"\?\n"
|
||||
"\014DropDefaults\022/\n\rdrop_defaults\030\001 \003(\0132\030.g"
|
||||
"reptime.v1.DropDefault\"<\n\013SetDefaults\022-\n"
|
||||
"\014set_defaults\030\001 \003(\0132\027.greptime.v1.SetDef"
|
||||
"ault\"<\n\013DropColumns\022-\n\014drop_columns\030\001 \003("
|
||||
"\0132\027.greptime.v1.DropColumn\"O\n\021ModifyColu"
|
||||
"mnTypes\022:\n\023modify_column_types\030\001 \003(\0132\035.g"
|
||||
"reptime.v1.ModifyColumnType\"%\n\013RenameTab"
|
||||
"le\022\026\n\016new_table_name\030\001 \001(\t\"\204\001\n\tAddColumn"
|
||||
"\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.Colum"
|
||||
"nDef\0220\n\010location\030\003 \001(\0132\036.greptime.v1.Add"
|
||||
"ColumnLocation\022\031\n\021add_if_not_exists\030\004 \001("
|
||||
"\010\"\236\001\n\020ModifyColumnType\022\023\n\013column_name\030\001 "
|
||||
"\001(\t\0220\n\013target_type\030\002 \001(\0162\033.greptime.v1.C"
|
||||
"olumnDataType\022C\n\025target_type_extension\030\003"
|
||||
" \001(\0132$.greptime.v1.ColumnDataTypeExtensi"
|
||||
"on\"$\n\006Option\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t"
|
||||
"\"=\n\017SetTableOptions\022*\n\rtable_options\030\001 \003"
|
||||
"(\0132\023.greptime.v1.Option\"!\n\021UnsetTableOpt"
|
||||
"ions\022\014\n\004keys\030\001 \003(\t\"\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\"\254\002\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022"
|
||||
".\n\tdata_type\030\002 \001(\0162\033.greptime.v1.ColumnD"
|
||||
"ataType\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022default_"
|
||||
"constraint\030\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\0162"
|
||||
"\031.greptime.v1.SemanticType\022\017\n\007comment\030\006 "
|
||||
"\001(\t\022@\n\022datatype_extension\030\007 \001(\0132$.grepti"
|
||||
"me.v1.ColumnDataTypeExtension\022+\n\007options"
|
||||
"\030\010 \001(\0132\032.greptime.v1.ColumnOptions\"\230\001\n\021A"
|
||||
"ddColumnLocation\022B\n\rlocation_type\030\001 \001(\0162"
|
||||
"+.greptime.v1.AddColumnLocation.Location"
|
||||
"Type\022\031\n\021after_column_name\030\002 \001(\t\"$\n\014Locat"
|
||||
"ionType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001\"\324\001\n\013SetFul"
|
||||
"ltext\022\023\n\013column_name\030\001 \001(\t\022\016\n\006enable\030\002 \001"
|
||||
"(\010\022\'\n\010analyzer\030\003 \001(\0162\025.greptime.v1.Analy"
|
||||
"zer\022\026\n\016case_sensitive\030\004 \001(\010\022-\n\007backend\030\005"
|
||||
" \001(\0162\034.greptime.v1.FulltextBackend\022\023\n\013gr"
|
||||
"anularity\030\006 \001(\004\022\033\n\023false_positive_rate\030\007"
|
||||
" \001(\001\"$\n\rUnsetFulltext\022\023\n\013column_name\030\001 \001"
|
||||
"(\t\"\"\n\013SetInverted\022\023\n\013column_name\030\001 \001(\t\"$"
|
||||
"\n\rUnsetInverted\022\023\n\013column_name\030\001 \001(\t\"\241\001\n"
|
||||
"\013SetSkipping\022\023\n\013column_name\030\001 \001(\t\022\016\n\006ena"
|
||||
"ble\030\002 \001(\010\022\023\n\013granularity\030\003 \001(\004\022;\n\023skippi"
|
||||
"ng_index_type\030\004 \001(\0162\036.greptime.v1.Skippi"
|
||||
"ngIndexType\022\033\n\023false_positive_rate\030\005 \001(\001"
|
||||
"\"$\n\rUnsetSkipping\022\023\n\013column_name\030\001 \001(\t\"\314"
|
||||
"\001\n\021AlterDatabaseExpr\022\024\n\014catalog_name\030\001 \001"
|
||||
"(\t\022\023\n\013schema_name\030\002 \001(\t\022\?\n\024set_database_"
|
||||
"options\030\003 \001(\0132\037.greptime.v1.SetDatabaseO"
|
||||
"ptionsH\000\022C\n\026unset_database_options\030\004 \001(\013"
|
||||
"2!.greptime.v1.UnsetDatabaseOptionsH\000B\006\n"
|
||||
"\004kind\"G\n\022SetDatabaseOptions\0221\n\024set_datab"
|
||||
"ase_options\030\001 \003(\0132\023.greptime.v1.Option\"$"
|
||||
"\n\024UnsetDatabaseOptions\022\014\n\004keys\030\001 \003(\t\"\217\003\n"
|
||||
"\021CreateTriggerExpr\022\024\n\014catalog_name\030\001 \001(\t"
|
||||
"\022\024\n\014trigger_name\030\002 \001(\t\022\034\n\024create_if_not_"
|
||||
"exists\030\003 \001(\010\022\013\n\003sql\030\004 \001(\t\022,\n\010channels\030\005 "
|
||||
"\003(\0132\032.greptime.v1.NotifyChannel\022:\n\006label"
|
||||
"s\030\006 \003(\0132*.greptime.v1.CreateTriggerExpr."
|
||||
"LabelsEntry\022D\n\013annotations\030\007 \003(\0132/.grept"
|
||||
"ime.v1.CreateTriggerExpr.AnnotationsEntr"
|
||||
"y\022\020\n\010interval\030\010 \001(\004\032-\n\013LabelsEntry\022\013\n\003ke"
|
||||
"y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020Annotation"
|
||||
"sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"]"
|
||||
"\n\rNotifyChannel\022\014\n\004name\030\001 \001(\t\022.\n\007webhook"
|
||||
"\030\002 \001(\0132\033.greptime.v1.WebhookOptionsH\000B\016\n"
|
||||
"\014channel_type\"\177\n\016WebhookOptions\022\013\n\003url\030\001"
|
||||
" \001(\t\0223\n\004opts\030\002 \003(\0132%.greptime.v1.Webhook"
|
||||
"Options.OptsEntry\032+\n\tOptsEntry\022\013\n\003key\030\001 "
|
||||
"\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"U\n\017DropTriggerExp"
|
||||
"r\022\024\n\014catalog_name\030\001 \001(\t\022\024\n\014trigger_name\030"
|
||||
"\002 \001(\t\022\026\n\016drop_if_exists\030\003 \001(\010*$\n\010Analyze"
|
||||
"r\022\013\n\007ENGLISH\020\000\022\013\n\007CHINESE\020\001*)\n\017FulltextB"
|
||||
"ackend\022\013\n\007TANTIVY\020\000\022\t\n\005BLOOM\020\001*%\n\021Skippi"
|
||||
"ngIndexType\022\020\n\014BLOOM_FILTER\020\000BL\n\016io.grep"
|
||||
"time.v1B\003DdlZ5github.com/GreptimeTeam/gr"
|
||||
"eptime-proto/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, 6868, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto,
|
||||
false, false, 6915, 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, 52,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets,
|
||||
@@ -8332,12 +8335,23 @@ void CreateDatabaseExpr::InternalSwap(CreateDatabaseExpr* other) {
|
||||
class TruncateTableExpr::_Internal {
|
||||
public:
|
||||
static const ::greptime::v1::TableId& table_id(const TruncateTableExpr* msg);
|
||||
static const ::greptime::v1::TimeRanges& time_ranges(const TruncateTableExpr* msg);
|
||||
};
|
||||
|
||||
const ::greptime::v1::TableId&
|
||||
TruncateTableExpr::_Internal::table_id(const TruncateTableExpr* msg) {
|
||||
return *msg->_impl_.table_id_;
|
||||
}
|
||||
const ::greptime::v1::TimeRanges&
|
||||
TruncateTableExpr::_Internal::time_ranges(const TruncateTableExpr* msg) {
|
||||
return *msg->_impl_.time_ranges_;
|
||||
}
|
||||
void TruncateTableExpr::clear_time_ranges() {
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.time_ranges_ != nullptr) {
|
||||
delete _impl_.time_ranges_;
|
||||
}
|
||||
_impl_.time_ranges_ = nullptr;
|
||||
}
|
||||
TruncateTableExpr::TruncateTableExpr(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
||||
@@ -8352,6 +8366,7 @@ TruncateTableExpr::TruncateTableExpr(const TruncateTableExpr& from)
|
||||
, decltype(_impl_.schema_name_){}
|
||||
, decltype(_impl_.table_name_){}
|
||||
, decltype(_impl_.table_id_){nullptr}
|
||||
, decltype(_impl_.time_ranges_){nullptr}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
@@ -8382,6 +8397,9 @@ TruncateTableExpr::TruncateTableExpr(const TruncateTableExpr& from)
|
||||
if (from._internal_has_table_id()) {
|
||||
_this->_impl_.table_id_ = new ::greptime::v1::TableId(*from._impl_.table_id_);
|
||||
}
|
||||
if (from._internal_has_time_ranges()) {
|
||||
_this->_impl_.time_ranges_ = new ::greptime::v1::TimeRanges(*from._impl_.time_ranges_);
|
||||
}
|
||||
// @@protoc_insertion_point(copy_constructor:greptime.v1.TruncateTableExpr)
|
||||
}
|
||||
|
||||
@@ -8394,6 +8412,7 @@ inline void TruncateTableExpr::SharedCtor(
|
||||
, decltype(_impl_.schema_name_){}
|
||||
, decltype(_impl_.table_name_){}
|
||||
, decltype(_impl_.table_id_){nullptr}
|
||||
, decltype(_impl_.time_ranges_){nullptr}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
_impl_.catalog_name_.InitDefault();
|
||||
@@ -8425,6 +8444,7 @@ inline void TruncateTableExpr::SharedDtor() {
|
||||
_impl_.schema_name_.Destroy();
|
||||
_impl_.table_name_.Destroy();
|
||||
if (this != internal_default_instance()) delete _impl_.table_id_;
|
||||
if (this != internal_default_instance()) delete _impl_.time_ranges_;
|
||||
}
|
||||
|
||||
void TruncateTableExpr::SetCachedSize(int size) const {
|
||||
@@ -8444,6 +8464,10 @@ void TruncateTableExpr::Clear() {
|
||||
delete _impl_.table_id_;
|
||||
}
|
||||
_impl_.table_id_ = nullptr;
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.time_ranges_ != nullptr) {
|
||||
delete _impl_.time_ranges_;
|
||||
}
|
||||
_impl_.time_ranges_ = nullptr;
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
@@ -8491,6 +8515,14 @@ const char* TruncateTableExpr::_InternalParse(const char* ptr, ::_pbi::ParseCont
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// .greptime.v1.TimeRanges time_ranges = 5;
|
||||
case 5:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
||||
ptr = ctx->ParseMessage(_internal_mutable_time_ranges(), ptr);
|
||||
CHK_(ptr);
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -8557,6 +8589,13 @@ uint8_t* TruncateTableExpr::_InternalSerialize(
|
||||
_Internal::table_id(this).GetCachedSize(), target, stream);
|
||||
}
|
||||
|
||||
// .greptime.v1.TimeRanges time_ranges = 5;
|
||||
if (this->_internal_has_time_ranges()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||
InternalWriteMessage(5, _Internal::time_ranges(this),
|
||||
_Internal::time_ranges(this).GetCachedSize(), target, stream);
|
||||
}
|
||||
|
||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
||||
@@ -8601,6 +8640,13 @@ size_t TruncateTableExpr::ByteSizeLong() const {
|
||||
*_impl_.table_id_);
|
||||
}
|
||||
|
||||
// .greptime.v1.TimeRanges time_ranges = 5;
|
||||
if (this->_internal_has_time_ranges()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||
*_impl_.time_ranges_);
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
@@ -8632,6 +8678,10 @@ void TruncateTableExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons
|
||||
_this->_internal_mutable_table_id()->::greptime::v1::TableId::MergeFrom(
|
||||
from._internal_table_id());
|
||||
}
|
||||
if (from._internal_has_time_ranges()) {
|
||||
_this->_internal_mutable_time_ranges()->::greptime::v1::TimeRanges::MergeFrom(
|
||||
from._internal_time_ranges());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
@@ -8663,7 +8713,12 @@ void TruncateTableExpr::InternalSwap(TruncateTableExpr* other) {
|
||||
&_impl_.table_name_, lhs_arena,
|
||||
&other->_impl_.table_name_, rhs_arena
|
||||
);
|
||||
swap(_impl_.table_id_, other->_impl_.table_id_);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||
PROTOBUF_FIELD_OFFSET(TruncateTableExpr, _impl_.time_ranges_)
|
||||
+ sizeof(TruncateTableExpr::_impl_.time_ranges_)
|
||||
- PROTOBUF_FIELD_OFFSET(TruncateTableExpr, _impl_.table_id_)>(
|
||||
reinterpret_cast<char*>(&_impl_.table_id_),
|
||||
reinterpret_cast<char*>(&other->_impl_.table_id_));
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata TruncateTableExpr::GetMetadata() const {
|
||||
|
||||
Reference in New Issue
Block a user