You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "arnaudbriche (via GitHub)" <gi...@apache.org> on 2025/03/19 20:44:06 UTC
[I] Implement DeleteFiles operation [iceberg-go]
arnaudbriche opened a new issue, #348:
URL: https://github.com/apache/iceberg-go/issues/348
### Feature Request / Improvement
Hi,
I see you recently added support for Transaction and AddFiles and this is awesome.
I'm building that uses this package to allow append/merges to Iceberg tables from ClickHouse.
ClickHouse handle merging Parquet files and just call the user defined function with a list of (output_file, input_files) and the tool does the necessary metadata operations to maintain the table.
The code is here: https://github.com/agnosticeng/icepq/blob/main/internal/iceberg/merge_table.go.
The only missing this from this package would be a "DeleteFiles" operation that work similar to this code.
Is there any plan to support something similar ?
--
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.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: [I] Implement DeleteFiles operation [iceberg-go]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #348:
URL: https://github.com/apache/iceberg-go/issues/348#issuecomment-2738339818
> Would you rather have a DeleteFiles method, or rather a MergeFiles method that does both add and delete.
Looking a the current code, I'm under the impression that going the DeleteFiles way would force to traverse the whole manifests twice (double the io).
A `MergeFiles` method would likely be better, along with direct functions to simply add a new equality or positional delete.
> One thing that would be useful, at least to me, would be to expose the function to get Iceberg schema from a Parque file public.
That would allow to get rid of this code: https://github.com/agnosticeng/icepq/blob/main/internal/parquet/schema.go.
My suggestion there would be to simply use the `pqarrow` package after you read the parquet file to get the Arrow schema representation (this is the way I currently do it inside the package). From there you can generate the iceberg schema. In general I've been trying to isolate the file format specifics from the rest of the logic to facilitate the ease of adding new file types in the future and potentially allowing users to inject their own file handling as long as it meets an interface.
> In my current use case, I create the table (and it's schema) but introspecting a bunch of Parquet files.
That said, when I add the ability to update the schema, it could make sense to allow `AddFiles` to introspect and determine the schema or otherwise. I'll keep this in mind.
> But I see a deletedFiles field in snapshot producer, but it's not filling anywhere.
What's the idea behind it ?
Right now it's just a place holder. Nothing is populating it yet, but the plumbing is hooked up. So once deleting files is implemented (for compaction, deletions, etc.) it should be easy to hook it up into the snapshot producers and generation of the manifests.
--
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: [I] Implement DeleteFiles operation [iceberg-go]
Posted by "arnaudbriche (via GitHub)" <gi...@apache.org>.
arnaudbriche commented on issue #348:
URL: https://github.com/apache/iceberg-go/issues/348#issuecomment-2738242752
Would you rather have a DeleteFiles method, or rather a MergeFiles method that does both add and delete.
Looking a the current code, I'm under the impression that going the DeleteFiles way would force to traverse the whole manifests twice (double the io).
Am I right or do I miss something ?
--
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: [I] Implement DeleteFiles operation [iceberg-go]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #348:
URL: https://github.com/apache/iceberg-go/issues/348#issuecomment-2738219873
Yup! It's planned, I don't have an ETA on it currently. But contributions are welcome!
I'll remember to reference this issue when I start working on 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: 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: [I] Implement DeleteFiles operation [iceberg-go]
Posted by "arnaudbriche (via GitHub)" <gi...@apache.org>.
arnaudbriche commented on issue #348:
URL: https://github.com/apache/iceberg-go/issues/348#issuecomment-2763371432
Implemented by https://github.com/apache/iceberg-go/pull/356
--
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: [I] Implement DeleteFiles operation [iceberg-go]
Posted by "arnaudbriche (via GitHub)" <gi...@apache.org>.
arnaudbriche closed issue #348: Implement DeleteFiles operation
URL: https://github.com/apache/iceberg-go/issues/348
--
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: [I] Implement DeleteFiles operation [iceberg-go]
Posted by "arnaudbriche (via GitHub)" <gi...@apache.org>.
arnaudbriche commented on issue #348:
URL: https://github.com/apache/iceberg-go/issues/348#issuecomment-2738252432
Regarding current API, I think it's overall great!
One thing the would be useful, at least to me, would be to expose the function to get Iceberg schema from a Parque file public.
That would allow to get rid of this code: https://github.com/agnosticeng/icepq/blob/main/internal/parquet/schema.go.
In my current use case, I create the table (and it's schema) but introspecting a bunch of Parquet files.
--
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: [I] Implement DeleteFiles operation [iceberg-go]
Posted by "arnaudbriche (via GitHub)" <gi...@apache.org>.
arnaudbriche commented on issue #348:
URL: https://github.com/apache/iceberg-go/issues/348#issuecomment-2738255768
Sorry to spam. But I see a `deletedFiles` field in snapshot producer, but it's not filling anywhere.
What's the idea behind 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: 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