mbutrovich commented on code in PR #20:
URL: https://github.com/apache/datafusion-iceberg/pull/20#discussion_r4199191644
##########
crates/datafusion/src/physical_plan/scan.rs:
##########
@@ -91,8 +187,10 @@ impl IcebergTableScan {
self.snapshot_id
}
- pub fn projection(&self) -> Option<&[String]> {
- self.projection.as_deref()
+ /// The names of the columns the scan reads, which are the fields of its
+ /// schema.
+ pub fn projection(&self) -> &[String] {
Review Comment:
Could the PR description call this out as a breaking change?
`IcebergTableScan::projection()` returns `Option<&[String]>` in the published
`iceberg-datafusion` 0.10.1
([`scan.rs`](https://github.com/apache/iceberg-rust/blob/04ae06bdb15a6fd7c7927d29d4e0f6a33de0f1f9/crates/integrations/datafusion/src/physical_plan/scan.rs#L94-L96)),
so a caller that matches on the `Option` will stop compiling when it upgrades.
I think returning the slice is the better API, since the `Option` was always
`Some`. The description still says that `projection()` keeps its signature.
--
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]