Skip to content

Commit

Permalink
fix style check
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightChess committed Aug 30, 2024
1 parent 1bf74d6 commit 91eb0d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/core/src/table/fs_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl FileSystemView {
Ok(partition_paths
.into_iter()
.filter(|path_str| {
let partitions = path_str
let partitions: Vec<HudiTablePartition> = path_str
.split('/')
.map(|s| HudiTablePartition::try_from((s, &field_data_type)).unwrap())
.collect();
Expand Down
6 changes: 3 additions & 3 deletions crates/core/src/table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ use crate::config::read::HudiReadConfig::AsOfTimestamp;
use crate::config::table::HudiTableConfig::{IsHiveStylePartitioning, PartitionFields};
use crate::config::table::{HudiTableConfig, TableTypeValue};
use crate::config::HudiConfigs;
use crate::file_group::{FileGroup, FileSlice};
use crate::file_group::FileSlice;
use crate::storage::utils::{empty_options, parse_uri};
use crate::storage::Storage;
use crate::table::fs_view::FileSystemView;
use crate::table::partitions::{HudiTablePartition, PartitionFilter};
use crate::table::partitions::PartitionFilter;
use crate::table::timeline::Timeline;

mod fs_view;
Expand Down Expand Up @@ -217,7 +217,7 @@ impl Table {
.fields
.into_iter()
.filter(|col| partition_set.contains(col.name()))
.map(|col| col.clone())
.cloned()
.collect();
Ok(Schema::new(Fields::from(partition_fields)))
}
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/table/partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl PartitionFilter {

/// Indicates if one of the HudiTable partition among the list
/// matches with the partition filter.
pub fn match_partitions(&self, partitions: &Vec<HudiTablePartition>) -> bool {
pub fn match_partitions(&self, partitions: &[HudiTablePartition]) -> bool {
partitions
.iter()
.any(|partition| self.match_partition(partition))
Expand Down

0 comments on commit 91eb0d1

Please sign in to comment.