alamb commented on code in PR #6758:
URL: https://github.com/apache/arrow-rs/pull/6758#discussion_r1890206152
##########
arrow-array/src/record_batch.rs:
##########
@@ -394,6 +396,56 @@ impl RecordBatch {
)
}
+ /// Normalize a semi-structured [`RecordBatch`] into a flat table.
+ ///
+ /// If max_level is 0, normalizes all levels.
Review Comment:
Can you please improve this documentation (maybe copy from the pyarrow
version)?
1. Doucment what `max_level` means (in addition to that 0)
2. Document what `separator` does
3. provide an example of flatteing a record batch as a doc example?
For example like
https://docs.rs/arrow/latest/arrow/index.html#columnar-format
<img width="808" alt="Screenshot 2024-12-18 at 8 05 08 AM"
src="https://github.com/user-attachments/assets/96c8a5a1-cc93-41a1-88e5-2e3849068bb8"
/>
##########
arrow-schema/src/schema.rs:
##########
@@ -413,6 +413,81 @@ impl Schema {
&self.metadata
}
+ /// Returns a new schema, normalized based on the max_level
+ /// This carries metadata from the parent schema over as well
Review Comment:
Likewise, please document the parametrs to this function and add a
documentation example
--
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]