sdd commented on code in PR #652: URL: https://github.com/apache/iceberg-rust/pull/652#discussion_r1875540197
########## crates/iceberg/src/spec/delete_file.rs: ########## @@ -0,0 +1,780 @@ +// 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 std::collections::HashMap; + +use arrow_array::{Int64Array, RecordBatch, StringArray}; +use arrow_schema::SchemaRef; +use futures::StreamExt; +use parquet::arrow::PARQUET_FIELD_ID_META_KEY; + +use crate::scan::ArrowRecordBatchStream; +use crate::{Error, ErrorKind, Result}; + +pub(crate) const FIELD_ID_DELETE_FILE_PATH: i32 = i32::MAX - 101; +pub(crate) const FIELD_ID_DELETE_POS: i32 = i32::MAX - 102; + +// Represents a parsed Delete file that can be safely stored +// in the Object Cache. +pub(crate) enum Deletes { + // Positional delete files are parsed into a map of + // filename to a sorted list of row indices. + // TODO: Ignoring the stored rows that are present in + // positional deletes for now. I think they only used for statistics? + Positional(HashMap<String, Vec<u64>>), Review Comment: Can we switch to that in a follow-up PR? This enum is `pub(crate)` so we won't break any users by doing so. -- 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