liurenjie1024 commented on code in PR #950: URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r1990910300
########## crates/iceberg/src/arrow/delete_file_manager.rs: ########## @@ -0,0 +1,64 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use roaring::RoaringTreemap; + +use crate::expr::BoundPredicate; +use crate::io::FileIO; +use crate::scan::FileScanTaskDeleteFile; +use crate::spec::SchemaRef; +use crate::{Error, ErrorKind, Result}; + +pub(crate) struct DeleteFileManager {} + +#[allow(unused_variables)] +impl DeleteFileManager { + pub(crate) async fn load_deletes( + delete_file_entries: Vec<FileScanTaskDeleteFile>, + file_io: FileIO, + concurrency_limit_data_files: usize, + ) -> Result<DeleteFileManager> { + // TODO + + if !delete_file_entries.is_empty() { + Err(Error::new( + ErrorKind::FeatureUnsupported, + "Reading delete files is not yet supported", + )) + } else { + Ok(DeleteFileManager {}) + } + } + + pub(crate) fn build_delete_predicate( + &self, + snapshot_schema: SchemaRef, + ) -> Result<Option<BoundPredicate>> { + // TODO + + Ok(None) + } + + pub(crate) fn get_positional_delete_indexes_for_data_file( Review Comment: > Would you be ok with your proposed struct PositionDeleteIndex exposing an .iter() method to return a public PositionDeleteIndexIter iterator, which itself implements advance_to? I'm fine with that. My concern is not exposing too much internals data structures to, and I think the `advance_to` method is easy to understand as iceberg spec requires that position delete file should be sorted. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org