You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "sdd (via GitHub)" <gi...@apache.org> on 2025/02/08 12:36:42 UTC
[PR] feat: introduce DeleteFileManager skeleton. Use in ArrowReader [iceberg-rust]
sdd opened a new pull request, #950:
URL: https://github.com/apache/iceberg-rust/pull/950
Second part of delete file read support. See https://github.com/apache/iceberg-rust/issues/630
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r1980293409
##########
crates/iceberg/src/arrow/reader.rs:
##########
@@ -162,30 +165,24 @@ impl ArrowReader {
file_io: FileIO,
row_group_filtering_enabled: bool,
row_selection_enabled: bool,
+ concurrency_limit_data_files: usize,
Review Comment:
I think at some point we want to read this from some kind of configuration
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on code in PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r1982076981
##########
crates/iceberg/src/arrow/reader.rs:
##########
@@ -162,30 +165,24 @@ impl ArrowReader {
file_io: FileIO,
row_group_filtering_enabled: bool,
row_selection_enabled: bool,
+ concurrency_limit_data_files: usize,
Review Comment:
Agreed. I think this also potentially makes more sense as a semaphore of some kind rather than just a usize so that it can be shared better between tasks that effectively you'd want to share the same combined limit.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 merged PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on code in PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r1982076981
##########
crates/iceberg/src/arrow/reader.rs:
##########
@@ -162,30 +165,24 @@ impl ArrowReader {
file_io: FileIO,
row_group_filtering_enabled: bool,
row_selection_enabled: bool,
+ concurrency_limit_data_files: usize,
Review Comment:
Agreed. I think this also potentially makes more sense as a semaphore of some kind rather than just a usize so that it can be shared more effectively.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#issuecomment-2647345904
@liurenjie1024, @Xuanwo, @Fokko - this is ready for review when any of you get chance. Thanks! :-)
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#issuecomment-2696602423
Hi @Xuanwo, @liurenjie1024, @Fokko, @ZENOTME - I've now got 5 separate PRs open for delete support on the read side that each extend the previous one. They're ready for review, with only a couple of tests outstanding that I expect to complete over the next day or two.
Would you mind reviewing please? It will be a bit of a burden to keep all of these separate PRs up-to-date with main whilst they are all still open.
Thanks, and I look forward to your feedback! 😁
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#issuecomment-2716921383
Thanks for the review @liurenjie1024 - will refactor with your comments in mind.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on code in PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r2004183085
##########
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(
Review Comment:
I've indicated within the newly-added trait definition that the basic file-to-record-batch-stream functionality is coming in a follow-up PR that I'll refactor so that it is used either in a struct that implements the trait or in a default implementation for the trait.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on code in PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r1990904869
##########
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:
Regarding wrapping the `RoaringBitmap` in a `PositionalDeleteIndex`. I can do that, although the Java version's interface precludes us from using [advance_to](https://docs.rs/roaring/latest/roaring/bitmap/struct.Iter.html#method.advance_to) which would be very useful to have access to within the `ArrowReader` row selection / page skipping code that I have in the follow-up PR to this one, https://github.com/apache/iceberg-rust/pull/951.
Would you be ok with your proposed `struct PositionDeleteIndex` exposing an `.iter()` method to return a public `PositionDeleteIndexIter` iterator, which itself implements `advance_to`?
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on code in PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r1990499327
##########
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 {}
Review Comment:
It would be better to make this a trait rather a struct, so that compute engines could has different cache policy, this is also inspired by our previous discussion in reader module.
##########
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(
Review Comment:
I think we should return arrow record batch rather predicate here. Or we could have a method built on the one which returns arrow record batch. The reason is that different engines may evaluate it in different approaches.
##########
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:
Similar to above comment, we should provide a base version with actual data (like arrow record batch) to give advanced users enough flexibility to do that. Also I don't think we should return internal data structure directly, maybe sth like following is better?
```
struct PositionDeleteIndex {
bitmap: RoaringTreemap
}
```
Motivated by [java version](https://github.com/apache/iceberg/blob/684f7a767c2c216a402b60b73d2d55ef605921a0/core/src/main/java/org/apache/iceberg/deletes/PositionDeleteIndex.java#L21)
##########
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 {}
Review Comment:
Of course we could provide a simple version without any cache as default choice.
##########
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>,
Review Comment:
I don't think we should pass this in constructor, rather it should be in an argument of `load_equality_delete` method.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on code in PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r2004185256
##########
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>,
Review Comment:
Done, see second commit in this PR.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on code in PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r2004184868
##########
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:
The third commit in this PR is focussed on changes raised by your original comment here.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on code in PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#discussion_r2004178851
##########
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 {}
Review Comment:
I've introduced a trait but kept all of the methods that I think would be only used in the in-tree engine, rather than any external ones, in the (renamed) struct. happy to adjust the content of this trait over the follow-up PRs if that works for you.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Scan Delete Support Part 2: introduce `DeleteFileManager` skeleton. Use in `ArrowReader` [iceberg-rust]
Posted by "sdd (via GitHub)" <gi...@apache.org>.
sdd commented on PR #950:
URL: https://github.com/apache/iceberg-rust/pull/950#issuecomment-2737948289
Back to you @liurenjie1024 - only small changes vs when you last looked so it should be pretty quick to re-review.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org