anoopj commented on code in PR #3128:
URL: https://github.com/apache/iceberg-rust/pull/3128#discussion_r3907228224
##########
crates/iceberg/src/scan/task.rs:
##########
@@ -150,6 +150,20 @@ pub struct FileScanTask {
#[builder(default)]
pub unified_partition_type: Option<Arc<StructType>>,
+ /// The sort order that this file's rows are sorted by, resolved from the
data file's
+ /// `sort_order_id` against the table's known sort orders. `None` if the
file has no
Review Comment:
Note that Iceberg reserves 0 for unsorted. Per the spec:
> Order id 0 is reserved for the unsorted order.
So a file with `sort_order_id = 0` will resolve to unsorted order whereas
a missing or unresolvable id gives `None`. So the datafusion consumer will need
to check for both. e.g. something like `sort_order.as_ref().is_some_and(|o|
!o.is_unsorted())`
May be a good idea to clarify this in the docs.
--
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]