etseidl commented on code in PR #6441:
URL: https://github.com/apache/arrow-rs/pull/6441#discussion_r1771892308


##########
arrow-schema/src/lib.rs:
##########
@@ -34,6 +36,35 @@ use std::ops;
 pub mod ffi;
 
 /// Options that define the sort order of a given column
+///
+/// The default sorts equivalently to of `ASC NULLS FIRST` in SQL (i.e.
+/// ascending order with nulls sorting before any other values).
+///
+/// # Example creation
+/// ```
+/// # use arrow_schema::SortOptions;
+/// let options = SortOptions {
+///   descending: false,
+///   nulls_first: true,
+/// };
+/// // Default is ASC NULLs First
+/// assert_eq!(options, SortOptions::default());
+/// assert_eq!(options.to_string(), "ASC");
+///
+/// // Configure using builder APIs
+/// let options = SortOptions::default()
+///  .desc()
+///  .with_nulls_first(true);
+/// assert_eq!(options.to_string(), "DESC NULLS FIRST");

Review Comment:
   ```suggestion
   /// assert_eq!(options.to_string(), "DESC");
   ```
   If `fmt` continues to print nothing for the default.



-- 
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]

Reply via email to