NoahKusaba commented on code in PR #2862:
URL: https://github.com/apache/iceberg-rust/pull/2862#discussion_r3740870777
##########
crates/integrations/datafusion/src/table/mod.rs:
##########
@@ -56,6 +56,31 @@ use crate::physical_plan::scan::IcebergTableScan;
use crate::physical_plan::sort::sort_by_partition;
use crate::physical_plan::write::IcebergWriteExec;
+/// Computes the arrow schema to expose for reading `table` at the given
snapshot:
+/// the table's current schema for `None`, that snapshot's schema for `Some`,
so
+/// a time-travel read plans against the schema in effect at that snapshot.
+pub fn snapshot_arrow_schema(table: &Table, snapshot_id: Option<i64>) ->
Result<ArrowSchemaRef> {
Review Comment:
I found myself needing this snapshot_arrow_schema value also in my physical
codec for my iceberg-ballista crate, so I made a generic function to avoid code
duplication.
--
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]