feat(proto): support unpartitioned source in repartition (#319)

Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
Weny Xu
2026-05-26 22:26:59 +08:00
committed by GitHub
parent dfd2a6d7d3
commit 7224c2ad6d
7 changed files with 4573 additions and 1099 deletions
+787 -190
View File
File diff suppressed because it is too large Load Diff
+763 -51
View File
File diff suppressed because it is too large Load Diff
+783 -594
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+14 -3
View File
@@ -162,10 +162,21 @@ message UnsetIndex {
} }
message Repartition { message Repartition {
// The from partition expressions serialized in JSON format. // Deprecated: use `source.partition_exprs.exprs` instead.
repeated string from_partition_exprs = 1; repeated string from_partition_exprs = 1 [deprecated = true];
// The into partition expressions serialized in JSON format.
repeated string into_partition_exprs = 2; repeated string into_partition_exprs = 2;
oneof source {
PartitionExprs partition_exprs = 3;
UnpartitionedSource unpartitioned = 4;
}
}
message PartitionExprs {
// The partition expressions serialized in JSON format.
repeated string exprs = 1;
}
message UnpartitionedSource {
// Partition columns for unpartitioned/single-region.
repeated string partition_columns = 1;
} }
message DropTableExpr { message DropTableExpr {
+26 -2
View File
@@ -1031,12 +1031,36 @@ pub mod unset_index {
} }
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Repartition { pub struct Repartition {
/// The from partition expressions serialized in JSON format. /// Deprecated: use `source.partition_exprs.exprs` instead.
#[deprecated]
#[prost(string, repeated, tag = "1")] #[prost(string, repeated, tag = "1")]
pub from_partition_exprs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, pub from_partition_exprs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The into partition expressions serialized in JSON format.
#[prost(string, repeated, tag = "2")] #[prost(string, repeated, tag = "2")]
pub into_partition_exprs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, pub into_partition_exprs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(oneof = "repartition::Source", tags = "3, 4")]
pub source: ::core::option::Option<repartition::Source>,
}
/// Nested message and enum types in `Repartition`.
pub mod repartition {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "3")]
PartitionExprs(super::PartitionExprs),
#[prost(message, tag = "4")]
Unpartitioned(super::UnpartitionedSource),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PartitionExprs {
/// The partition expressions serialized in JSON format.
#[prost(string, repeated, tag = "1")]
pub exprs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnpartitionedSource {
/// Partition columns for unpartitioned/single-region.
#[prost(string, repeated, tag = "1")]
pub partition_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
} }
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DropTableExpr { pub struct DropTableExpr {
Binary file not shown.