xxchan opened a new issue, #636: URL: https://github.com/apache/iceberg-rust/issues/636
Hi, I propose to re-export arrow types in iceberg. Want to hear your opinions @liurenjie1024 @Xuanwo ## Rationale **When a crate uses a dependency's type in the public API, it would be better to re-export the dependency.** The largest benefit is ease of handling multiple versions: ```toml [dependencies] # arrow used in the project arrow = "50" # which depends on arrow 52 iceberg = "0.3" ``` In this case, if we want to pass `arrow_array::RecordBatch` to `iceberg`, we have to do something like this: ```toml [dependencies] # arrow used in the project arrow-array = "50" # which depends on arrow 52 iceberg = "0.3" arrow-array-for-iceberg = { package="arrow", version="52"} ``` and then pass `arrow_array_for_arrow_udf::RecordBatch` to `iceberg`. If `iceberg` re-export it like `iceberg::arrow::RecordBatch`, then we don't need to do so. Note: This assumes that multiple versions are to some extent unavoidable. It won't help if we want to pass arrow 50 data to arrow 52 data. But it's more like some part of the code only want to pass data to `iceberg` without affecting other parts of the code that uses arrow 50. Finally, I don't think there are any drawbacks to re-export `arrow` in `iceberg`. More discussion about this problem: - https://github.com/arrow-udf/arrow-udf/issues/65 - [lurklurk.org/effective-rust/re-export.html](https://www.lurklurk.org/effective-rust/re-export.html) - [brokenco.de/2023/07/26/rust-re-export.html](https://brokenco.de/2023/07/26/rust-re-export.html) (This talks about why `delta-rs` re-export `arrow_array::RecordBatch`, highly similar to us 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-unsubscr...@iceberg.apache.org.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