Skip to content

Commit

Permalink
chore: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dantengsky committed Aug 5, 2024
1 parent 7ef2c4e commit fa2dd1d
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 28 deletions.
3 changes: 2 additions & 1 deletion src/query/catalog/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ use databend_common_meta_types::MetaId;
use databend_common_pipeline_core::Pipeline;
use databend_common_storage::Histogram;
use databend_common_storage::StorageMetrics;
use databend_storages_common_table_meta::meta::{SnapshotId, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::SnapshotId;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshot;
use databend_storages_common_table_meta::table::ChangeType;

Expand Down
3 changes: 2 additions & 1 deletion src/query/service/src/test_kits/block_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ use databend_common_storages_fuse::io::WriteSettings;
use databend_common_storages_fuse::FuseStorageFormat;
use databend_storages_common_blocks::blocks_to_parquet;
use databend_storages_common_index::BloomIndex;
use databend_storages_common_table_meta::meta::{BlockMeta, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::BlockMeta;
use databend_storages_common_table_meta::meta::ClusterStatistics;
use databend_storages_common_table_meta::meta::Compression;
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::StatisticsOfColumns;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::table::TableCompression;
use opendal::Operator;
use parquet::format::FileMetaData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ use std::sync::Arc;

use databend_common_meta_app::schema::TableInfo;
use databend_common_meta_app::schema::UpdateStreamMetaReq;
use databend_storages_common_table_meta::meta::{BlockMeta, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::BlockMeta;
use databend_storages_common_table_meta::meta::Statistics;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshot;

use crate::executor::physical_plans::common::MutationKind;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use databend_common_expression::DataSchemaRef;
use databend_common_expression::DataSchemaRefExt;
use databend_common_expression::Scalar;
use databend_common_meta_app::schema::TableInfo;
use enum_as_inner::EnumAsInner;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use enum_as_inner::EnumAsInner;

use crate::executor::physical_plan::PhysicalPlan;
use crate::plans::CopyIntoTableMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ use databend_common_expression::PREDICATE_COLUMN_NAME;
use databend_common_expression::ROW_ID_COL_NAME;
use databend_common_functions::BUILTIN_FUNCTIONS;
use databend_common_meta_app::schema::TableInfo;
use databend_storages_common_table_meta::meta::{Location, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::NUM_BLOCK_ID_BITS;
use databend_storages_common_table_meta::readers::snapshot_reader::TableSnapshotAccessor;
use itertools::Itertools;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
use databend_common_expression::BlockThresholds;
use databend_common_expression::FieldIndex;
use databend_common_meta_app::schema::TableInfo;
use databend_storages_common_table_meta::meta::{BlockSlotDescription, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::BlockSlotDescription;
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;

use crate::executor::physical_plans::common::OnConflictField;
use crate::executor::PhysicalPlan;
Expand Down
2 changes: 1 addition & 1 deletion src/query/storages/common/table_meta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ pub mod table;

mod util;

pub use util::*;
pub use util::*;
3 changes: 2 additions & 1 deletion src/query/storages/fuse/src/fuse_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ use databend_common_storage::DataOperator;
use databend_common_storage::StorageMetrics;
use databend_common_storage::StorageMetricsLayer;
use databend_storages_common_cache::LoadParams;
use databend_storages_common_table_meta::meta::{ClusterKey, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::ClusterKey;
use databend_storages_common_table_meta::meta::SnapshotId;
use databend_storages_common_table_meta::meta::Statistics as FuseStatistics;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshot;
use databend_storages_common_table_meta::meta::TableSnapshotStatistics;
use databend_storages_common_table_meta::meta::Versioned;
Expand Down
8 changes: 3 additions & 5 deletions src/query/storages/fuse/src/io/locations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ use std::marker::PhantomData;

use databend_common_exception::Result;
use databend_common_expression::DataBlock;
use databend_storages_common_table_meta::meta::{TableMetaTimestamps, uuid_from_date_time};
use databend_storages_common_table_meta::meta::uuid_from_date_time;
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::SegmentInfo;
use databend_storages_common_table_meta::meta::SnapshotVersion;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshotStatisticsVersion;
use databend_storages_common_table_meta::meta::Versioned;
use databend_storages_common_table_meta::trim_v5_object_prefix;
Expand Down Expand Up @@ -111,10 +112,7 @@ impl TableMetaLocationGenerator {
)
}

pub fn gen_segment_info_location(
&self,
table_meta_timestamps: TableMetaTimestamps,
) -> String {
pub fn gen_segment_info_location(&self, table_meta_timestamps: TableMetaTimestamps) -> String {
let segment_uuid = uuid_from_date_time(table_meta_timestamps.base_timestamp);
format!(
"{}/{}/{}{}_v{}.mpk",
Expand Down
3 changes: 2 additions & 1 deletion src/query/storages/fuse/src/io/write/block_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ use databend_common_metrics::storage::metrics_inc_block_write_milliseconds;
use databend_common_metrics::storage::metrics_inc_block_write_nums;
use databend_storages_common_blocks::blocks_to_parquet;
use databend_storages_common_index::BloomIndex;
use databend_storages_common_table_meta::meta::{BlockMeta, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::BlockMeta;
use databend_storages_common_table_meta::meta::ClusterStatistics;
use databend_storages_common_table_meta::meta::ColumnMeta;
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::table::TableCompression;
use log::info;
use opendal::Operator;
Expand Down
3 changes: 2 additions & 1 deletion src/query/storages/fuse/src/io/write/segment_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
// limitations under the License.

use databend_common_exception::Result;
use databend_storages_common_table_meta::meta::{Location, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::SegmentInfo;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::Versioned;
use opendal::Operator;

Expand Down
3 changes: 2 additions & 1 deletion src/query/storages/fuse/src/operations/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ use databend_common_pipeline_transforms::processors::TransformPipelineHelper;
use databend_common_sql::executor::physical_plans::MutationKind;
use databend_storages_common_cache::CacheAccessor;
use databend_storages_common_cache_manager::CachedObject;
use databend_storages_common_table_meta::meta::{Location, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::SegmentInfo;
use databend_storages_common_table_meta::meta::SnapshotId;
use databend_storages_common_table_meta::meta::Statistics;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshot;
use databend_storages_common_table_meta::meta::TableSnapshotStatistics;
use databend_storages_common_table_meta::meta::Versioned;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ use databend_common_expression::Scalar;
use databend_common_expression::TableDataType;
use databend_common_expression::TableSchema;
use databend_common_sql::field_default_value;
use databend_storages_common_table_meta::meta::{ClusterKey, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::ClusterKey;
use databend_storages_common_table_meta::meta::ColumnStatistics;
use databend_storages_common_table_meta::meta::Statistics;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshot;
use log::info;
use log::warn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ use databend_common_exception::Result;
use databend_common_expression::TableSchema;
use databend_common_metrics::storage::*;
use databend_common_sql::executor::physical_plans::MutationKind;
use databend_storages_common_table_meta::meta::{ClusterKey, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::ClusterKey;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshot;
use databend_storages_common_table_meta::readers::snapshot_reader::TableSnapshotAccessor;
use log::info;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ use std::sync::Arc;

use databend_common_exception::Result;
use databend_common_expression::TableSchema;
use databend_storages_common_table_meta::meta::{ClusterKey, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::ClusterKey;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshot;

use crate::operations::common::SnapshotGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ use databend_common_pipeline_core::processors::Event;
use databend_common_pipeline_core::processors::InputPort;
use databend_common_pipeline_core::processors::Processor;
use databend_common_pipeline_core::processors::ProcessorPtr;
use databend_storages_common_table_meta::meta::{ClusterKey, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::ClusterKey;
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::SnapshotId;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshot;
use databend_storages_common_table_meta::meta::Versioned;
use log::debug;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ use databend_common_expression::TableSchemaRef;
use databend_common_metrics::storage::metrics_inc_recluster_write_block_nums;
use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransform;
use databend_common_sql::executor::physical_plans::MutationKind;
use databend_storages_common_table_meta::meta::{BlockMeta, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::BlockMeta;
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::SegmentInfo;
use databend_storages_common_table_meta::meta::Statistics;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::Versioned;
use itertools::Itertools;
use log::debug;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ use databend_common_pipeline_core::processors::ProcessorPtr;
use databend_common_pipeline_core::PipeItem;
use databend_common_sql::executor::physical_plans::MutationKind;
use databend_storages_common_index::BloomIndex;
use opendal::Operator;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use opendal::Operator;

use crate::io::create_inverted_index_builders;
use crate::io::BlockBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ use databend_common_pipeline_core::processors::ProcessorPtr;
use databend_common_pipeline_core::PipeItem;
use databend_storages_common_cache::CacheAccessor;
use databend_storages_common_cache_manager::CachedObject;
use databend_storages_common_table_meta::meta::{BlockMeta, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::BlockMeta;
use databend_storages_common_table_meta::meta::SegmentInfo;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::Versioned;
use log::info;
use opendal::Operator;
Expand Down
3 changes: 2 additions & 1 deletion src/query/storages/fuse/src/operations/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ use databend_common_pipeline_core::Pipeline;
use databend_common_pipeline_transforms::processors::TransformPipelineHelper;
use databend_common_sql::executor::physical_plans::MutationKind;
use databend_common_sql::StreamContext;
use databend_storages_common_table_meta::meta::{Statistics, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::Statistics;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::meta::TableSnapshot;

use crate::operations::common::TableMutationAggregator;
Expand Down
3 changes: 2 additions & 1 deletion src/query/storages/fuse/src/operations/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ use databend_common_exception::Result;
use databend_common_expression::TableSchemaRef;
use databend_common_pipeline_core::PipeItem;
use databend_storages_common_index::BloomIndex;
use databend_storages_common_table_meta::meta::{Location, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::Location;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;

use super::merge_into::MatchedAggregator;
use super::mutation::SegmentIndex;
Expand Down
3 changes: 2 additions & 1 deletion src/query/storages/hive/hive/src/hive_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ use databend_common_pipeline_sources::SyncSourcer;
use databend_common_storage::init_operator;
use databend_common_storage::DataOperator;
use databend_storages_common_index::RangeIndex;
use databend_storages_common_table_meta::meta::{SnapshotId, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::SnapshotId;
use databend_storages_common_table_meta::meta::StatisticsOfColumns;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use databend_storages_common_table_meta::table::ChangeType;
use futures::TryStreamExt;
use log::info;
Expand Down
3 changes: 2 additions & 1 deletion src/query/storages/memory/src/memory_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ use databend_common_pipeline_sinks::Sinker;
use databend_common_pipeline_sources::SyncSource;
use databend_common_pipeline_sources::SyncSourcer;
use databend_common_storage::StorageMetrics;
use databend_storages_common_table_meta::meta::{SnapshotId, TableMetaTimestamps};
use databend_storages_common_table_meta::meta::SnapshotId;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use parking_lot::Mutex;
use parking_lot::RwLock;

Expand Down
2 changes: 1 addition & 1 deletion src/query/storages/stage/src/stage_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ use databend_common_storage::StageFileInfo;
use databend_common_storages_orc::OrcTableForCopy;
use databend_common_storages_parquet::ParquetTableForCopy;
use databend_storages_common_stage::SingleFilePartition;
use opendal::Operator;
use databend_storages_common_table_meta::meta::TableMetaTimestamps;
use opendal::Operator;

use crate::read::row_based::RowBasedReadPipelineBuilder;

Expand Down

0 comments on commit fa2dd1d

Please sign in to comment.