Skip to content

Commit 3b57682

Browse files
committed
refactor: change latest to v2
1 parent f09af8e commit 3b57682

8 files changed

Lines changed: 110 additions & 110 deletions

File tree

influxdb3_catalog/src/log.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pub mod create;
22
pub(crate) mod versions;
3-
pub use versions::latest::*;
3+
pub use versions::v2::*;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pub(crate) mod latest;
21
pub(crate) mod v1;
2+
pub(crate) mod v2;

influxdb3_catalog/src/log/versions/v1/conversion.rs

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.
File renamed without changes.

influxdb3_catalog/src/snapshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pub(crate) mod versions;
2-
pub(crate) use versions::latest::*;
2+
pub(crate) use versions::v2::*;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pub(crate) mod latest;
21
pub(crate) mod v1;
2+
pub(crate) mod v2;

influxdb3_catalog/src/snapshot/versions/v1/conversion.rs

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use influxdb3_id::CatalogId;
22

3-
use crate::{catalog::NodeState, snapshot::versions::latest};
3+
use crate::{catalog::NodeState, snapshot::versions::v2};
44

5-
impl From<super::CatalogSnapshot> for latest::CatalogSnapshot {
5+
impl From<super::CatalogSnapshot> for v2::CatalogSnapshot {
66
fn from(value: super::CatalogSnapshot) -> Self {
77
Self {
88
nodes: value.nodes.into(),
@@ -14,7 +14,7 @@ impl From<super::CatalogSnapshot> for latest::CatalogSnapshot {
1414
}
1515
}
1616

17-
impl<I, RS, RL> From<super::RepositorySnapshot<I, RS>> for latest::RepositorySnapshot<I, RL>
17+
impl<I, RS, RL> From<super::RepositorySnapshot<I, RS>> for v2::RepositorySnapshot<I, RL>
1818
where
1919
I: CatalogId,
2020
RL: From<RS>,
@@ -27,7 +27,7 @@ where
2727
}
2828
}
2929

30-
impl From<super::NodeSnapshot> for latest::NodeSnapshot {
30+
impl From<super::NodeSnapshot> for v2::NodeSnapshot {
3131
fn from(value: super::NodeSnapshot) -> Self {
3232
Self {
3333
node_id: value.node_id,
@@ -51,7 +51,7 @@ impl From<super::NodeState> for NodeState {
5151
}
5252
}
5353

54-
impl From<super::DatabaseSnapshot> for latest::DatabaseSnapshot {
54+
impl From<super::DatabaseSnapshot> for v2::DatabaseSnapshot {
5555
fn from(value: super::DatabaseSnapshot) -> Self {
5656
Self {
5757
id: value.id,
@@ -63,7 +63,7 @@ impl From<super::DatabaseSnapshot> for latest::DatabaseSnapshot {
6363
}
6464
}
6565

66-
impl From<super::TableSnapshot> for latest::TableSnapshot {
66+
impl From<super::TableSnapshot> for v2::TableSnapshot {
6767
fn from(value: super::TableSnapshot) -> Self {
6868
Self {
6969
table_id: value.table_id,
@@ -77,7 +77,7 @@ impl From<super::TableSnapshot> for latest::TableSnapshot {
7777
}
7878
}
7979

80-
impl From<super::ColumnDefinitionSnapshot> for latest::ColumnDefinitionSnapshot {
80+
impl From<super::ColumnDefinitionSnapshot> for v2::ColumnDefinitionSnapshot {
8181
fn from(value: super::ColumnDefinitionSnapshot) -> Self {
8282
Self {
8383
name: value.name,
@@ -89,59 +89,59 @@ impl From<super::ColumnDefinitionSnapshot> for latest::ColumnDefinitionSnapshot
8989
}
9090
}
9191

92-
impl From<super::DataType> for latest::DataType {
92+
impl From<super::DataType> for v2::DataType {
9393
fn from(value: super::DataType) -> Self {
9494
match value {
95-
super::DataType::Null => latest::DataType::Null,
96-
super::DataType::Bool => latest::DataType::Bool,
97-
super::DataType::I8 => latest::DataType::I8,
98-
super::DataType::I16 => latest::DataType::I16,
99-
super::DataType::I32 => latest::DataType::I32,
100-
super::DataType::I64 => latest::DataType::I64,
101-
super::DataType::U8 => latest::DataType::U8,
102-
super::DataType::U16 => latest::DataType::U16,
103-
super::DataType::U32 => latest::DataType::U32,
104-
super::DataType::U64 => latest::DataType::U64,
105-
super::DataType::F16 => latest::DataType::F16,
106-
super::DataType::F32 => latest::DataType::F32,
107-
super::DataType::F64 => latest::DataType::F64,
108-
super::DataType::Str => latest::DataType::Str,
109-
super::DataType::BigStr => latest::DataType::BigStr,
110-
super::DataType::StrView => latest::DataType::StrView,
111-
super::DataType::Bin => latest::DataType::Bin,
112-
super::DataType::BigBin => latest::DataType::BigBin,
113-
super::DataType::BinView => latest::DataType::BinView,
114-
super::DataType::Dict(a, b) => latest::DataType::Dict(
95+
super::DataType::Null => v2::DataType::Null,
96+
super::DataType::Bool => v2::DataType::Bool,
97+
super::DataType::I8 => v2::DataType::I8,
98+
super::DataType::I16 => v2::DataType::I16,
99+
super::DataType::I32 => v2::DataType::I32,
100+
super::DataType::I64 => v2::DataType::I64,
101+
super::DataType::U8 => v2::DataType::U8,
102+
super::DataType::U16 => v2::DataType::U16,
103+
super::DataType::U32 => v2::DataType::U32,
104+
super::DataType::U64 => v2::DataType::U64,
105+
super::DataType::F16 => v2::DataType::F16,
106+
super::DataType::F32 => v2::DataType::F32,
107+
super::DataType::F64 => v2::DataType::F64,
108+
super::DataType::Str => v2::DataType::Str,
109+
super::DataType::BigStr => v2::DataType::BigStr,
110+
super::DataType::StrView => v2::DataType::StrView,
111+
super::DataType::Bin => v2::DataType::Bin,
112+
super::DataType::BigBin => v2::DataType::BigBin,
113+
super::DataType::BinView => v2::DataType::BinView,
114+
super::DataType::Dict(a, b) => v2::DataType::Dict(
115115
Box::new(a.as_ref().clone().into()),
116116
Box::new(b.as_ref().clone().into()),
117117
),
118-
super::DataType::Time(tu, tz) => latest::DataType::Time(tu.into(), tz),
118+
super::DataType::Time(tu, tz) => v2::DataType::Time(tu.into(), tz),
119119
}
120120
}
121121
}
122122

123-
impl From<super::TimeUnit> for latest::TimeUnit {
123+
impl From<super::TimeUnit> for v2::TimeUnit {
124124
fn from(value: super::TimeUnit) -> Self {
125125
match value {
126-
super::TimeUnit::Second => latest::TimeUnit::Second,
127-
super::TimeUnit::Millisecond => latest::TimeUnit::Millisecond,
128-
super::TimeUnit::Microsecond => latest::TimeUnit::Microsecond,
129-
super::TimeUnit::Nanosecond => latest::TimeUnit::Nanosecond,
126+
super::TimeUnit::Second => v2::TimeUnit::Second,
127+
super::TimeUnit::Millisecond => v2::TimeUnit::Millisecond,
128+
super::TimeUnit::Microsecond => v2::TimeUnit::Microsecond,
129+
super::TimeUnit::Nanosecond => v2::TimeUnit::Nanosecond,
130130
}
131131
}
132132
}
133133

134-
impl From<super::InfluxType> for latest::InfluxType {
134+
impl From<super::InfluxType> for v2::InfluxType {
135135
fn from(value: super::InfluxType) -> Self {
136136
match value {
137-
super::InfluxType::Tag => latest::InfluxType::Tag,
138-
super::InfluxType::Field => latest::InfluxType::Field,
139-
super::InfluxType::Time => latest::InfluxType::Time,
137+
super::InfluxType::Tag => v2::InfluxType::Tag,
138+
super::InfluxType::Field => v2::InfluxType::Field,
139+
super::InfluxType::Time => v2::InfluxType::Time,
140140
}
141141
}
142142
}
143143

144-
impl From<super::LastCacheSnapshot> for latest::LastCacheSnapshot {
144+
impl From<super::LastCacheSnapshot> for v2::LastCacheSnapshot {
145145
fn from(value: super::LastCacheSnapshot) -> Self {
146146
Self {
147147
table_id: value.table_id,
@@ -156,7 +156,7 @@ impl From<super::LastCacheSnapshot> for latest::LastCacheSnapshot {
156156
}
157157
}
158158

159-
impl From<super::DistinctCacheSnapshot> for latest::DistinctCacheSnapshot {
159+
impl From<super::DistinctCacheSnapshot> for v2::DistinctCacheSnapshot {
160160
fn from(value: super::DistinctCacheSnapshot) -> Self {
161161
Self {
162162
table_id: value.table_id,
@@ -170,7 +170,7 @@ impl From<super::DistinctCacheSnapshot> for latest::DistinctCacheSnapshot {
170170
}
171171
}
172172

173-
impl From<super::ProcessingEngineTriggerSnapshot> for latest::ProcessingEngineTriggerSnapshot {
173+
impl From<super::ProcessingEngineTriggerSnapshot> for v2::ProcessingEngineTriggerSnapshot {
174174
fn from(value: super::ProcessingEngineTriggerSnapshot) -> Self {
175175
Self {
176176
trigger_id: value.trigger_id,
File renamed without changes.

0 commit comments

Comments
 (0)