From e523f7e8c12d79303035dcc5e297edb3d77bc1bd Mon Sep 17 00:00:00 2001 From: August Date: Tue, 16 Jan 2024 16:57:42 +0800 Subject: [PATCH] fmt --- src/common/src/catalog/mod.rs | 2 +- src/connector/src/sink/catalog/mod.rs | 5 ++++- src/frontend/src/optimizer/plan_node/stream_materialize.rs | 3 +-- src/frontend/src/optimizer/plan_node/utils.rs | 6 ++++-- src/meta/model_v2/src/table.rs | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/common/src/catalog/mod.rs b/src/common/src/catalog/mod.rs index 25fd96dfd212..9bf025061f9b 100644 --- a/src/common/src/catalog/mod.rs +++ b/src/common/src/catalog/mod.rs @@ -65,7 +65,7 @@ pub const DEFAULT_SUPER_USER_FOR_PG_ID: u32 = 2; pub const NON_RESERVED_USER_ID: i32 = 11; pub const NON_RESERVED_SYS_CATALOG_ID: i32 = 1001; -pub const OBJECT_ID_PLACEHOLDER: u32 = OBJECT_ID_PLACEHOLDER; +pub const OBJECT_ID_PLACEHOLDER: u32 = u32::MAX - 1; pub const SYSTEM_SCHEMAS: [&str; 3] = [ PG_CATALOG_SCHEMA_NAME, diff --git a/src/connector/src/sink/catalog/mod.rs b/src/connector/src/sink/catalog/mod.rs index 17feb9fc6d43..d4e38cac4d1c 100644 --- a/src/connector/src/sink/catalog/mod.rs +++ b/src/connector/src/sink/catalog/mod.rs @@ -18,7 +18,10 @@ use std::collections::{BTreeMap, HashMap}; use anyhow::anyhow; use itertools::Itertools; -use risingwave_common::catalog::{ColumnCatalog, ConnectionId, DatabaseId, Field, OBJECT_ID_PLACEHOLDER, Schema, SchemaId, TableId, UserId}; +use risingwave_common::catalog::{ + ColumnCatalog, ConnectionId, DatabaseId, Field, Schema, SchemaId, TableId, UserId, + OBJECT_ID_PLACEHOLDER, +}; use risingwave_common::util::epoch::Epoch; use risingwave_common::util::sort_util::ColumnOrder; use risingwave_pb::catalog::{PbSink, PbSinkFormatDesc, PbSinkType, PbStreamJobStatus}; diff --git a/src/frontend/src/optimizer/plan_node/stream_materialize.rs b/src/frontend/src/optimizer/plan_node/stream_materialize.rs index 2b6a7093d26e..c0b58701f414 100644 --- a/src/frontend/src/optimizer/plan_node/stream_materialize.rs +++ b/src/frontend/src/optimizer/plan_node/stream_materialize.rs @@ -17,7 +17,7 @@ use std::assert_matches::assert_matches; use fixedbitset::FixedBitSet; use itertools::Itertools; use pretty_xmlish::{Pretty, XmlNode}; -use risingwave_common::catalog::{ColumnCatalog, ConflictBehavior, OBJECT_ID_PLACEHOLDER, TableId}; +use risingwave_common::catalog::{ColumnCatalog, ConflictBehavior, TableId, OBJECT_ID_PLACEHOLDER}; use risingwave_common::error::Result; use risingwave_common::util::iter_util::ZipEqFast; use risingwave_common::util::sort_util::{ColumnOrder, OrderType}; @@ -29,7 +29,6 @@ use super::stream::StreamPlanRef; use super::utils::{childless_record, Distill}; use super::{reorganize_elements_id, ExprRewritable, PlanRef, PlanTreeNodeUnary, StreamNode}; use crate::catalog::table_catalog::{CreateType, TableCatalog, TableType, TableVersion}; -use crate::catalog::FragmentId; use crate::optimizer::plan_node::derive::derive_pk; use crate::optimizer::plan_node::expr_visitable::ExprVisitable; use crate::optimizer::plan_node::generic::GenericPlanRef; diff --git a/src/frontend/src/optimizer/plan_node/utils.rs b/src/frontend/src/optimizer/plan_node/utils.rs index 96efe36f0afe..75d2f8b60604 100644 --- a/src/frontend/src/optimizer/plan_node/utils.rs +++ b/src/frontend/src/optimizer/plan_node/utils.rs @@ -19,11 +19,13 @@ use std::vec; use fixedbitset::FixedBitSet; use itertools::Itertools; use pretty_xmlish::{Pretty, Str, StrAssocArr, XmlNode}; -use risingwave_common::catalog::{ColumnCatalog, ColumnDesc, ConflictBehavior, Field, FieldDisplay, OBJECT_ID_PLACEHOLDER, Schema}; +use risingwave_common::catalog::{ + ColumnCatalog, ColumnDesc, ConflictBehavior, Field, FieldDisplay, Schema, OBJECT_ID_PLACEHOLDER, +}; use risingwave_common::util::sort_util::{ColumnOrder, OrderType}; use crate::catalog::table_catalog::{CreateType, TableType}; -use crate::catalog::{ColumnId, FragmentId, TableCatalog, TableId}; +use crate::catalog::{ColumnId, TableCatalog, TableId}; use crate::optimizer::property::Cardinality; use crate::utils::WithOptions; diff --git a/src/meta/model_v2/src/table.rs b/src/meta/model_v2/src/table.rs index ac4a9b0649b6..446c928718cf 100644 --- a/src/meta/model_v2/src/table.rs +++ b/src/meta/model_v2/src/table.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use risingwave_pb::catalog::table::{OptionalAssociatedSourceId, PbTableType}; use risingwave_common::catalog::OBJECT_ID_PLACEHOLDER; +use risingwave_pb::catalog::table::{OptionalAssociatedSourceId, PbTableType}; use risingwave_pb::catalog::{PbHandleConflictBehavior, PbTable}; use sea_orm::entity::prelude::*; use sea_orm::ActiveValue::Set;