alexanderbianchi commented on code in PR #67:
URL: https://github.com/apache/datafusion-iceberg/pull/67#discussion_r4577175721


##########
crates/datafusion/tests/common/position_deletes.rs:
##########
@@ -0,0 +1,197 @@
+// 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 std::error::Error;
+use std::fs;
+use std::io;
+use std::path::Path;
+use std::sync::Arc;
+
+use datafusion::arrow::array::{ArrayRef, Int64Array, RecordBatch, StringArray};
+use datafusion::arrow::datatypes::{DataType, Field, Schema};
+use datafusion::prelude::SessionConfig;
+use iceberg::Runtime;
+use iceberg::metadata_columns::{
+    RESERVED_COL_NAME_DELETE_FILE_PATH, RESERVED_COL_NAME_DELETE_FILE_POS,
+    RESERVED_FIELD_ID_DELETE_FILE_PATH, RESERVED_FIELD_ID_DELETE_FILE_POS,
+};
+use iceberg::spec::{
+    DataContentType, DataFileBuilder, DataFileFormat, ManifestListWriter,
+    ManifestWriterBuilder, Operation, Snapshot, Summary,
+};
+use iceberg::table::Table;
+use iceberg_datafusion::IcebergCatalogTableProvider;
+use iceberg_datafusion::test_utils::IcebergTestHarness;
+use parquet::arrow::{ArrowWriter, PARQUET_FIELD_ID_META_KEY};
+use tempfile::TempDir;
+
+/// A taxi table with its first data file's first row deleted.
+/// Owns the copied files for the lifetime of scans against this table.
+pub struct PositionDeleteFixture {
+    pub table: Table,
+    _directory: TempDir,
+}
+
+pub async fn taxi_with_position_delete() -> Result<PositionDeleteFixture, 
Box<dyn Error>>

Review Comment:
   Agreed, I think https://github.com/apache/datafusion-iceberg/pull/87 is a 
first step, would you like to merge it?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to