alamb commented on code in PR #14996:
URL: https://github.com/apache/datafusion/pull/14996#discussion_r1979242054
##########
datafusion/core/src/datasource/mod.rs:
##########
@@ -54,16 +54,55 @@ use datafusion_common::{plan_err, Result};
use datafusion_expr::{Expr, SortExpr};
use datafusion_physical_expr::{expressions, LexOrdering, PhysicalSortExpr};
-fn create_ordering(
+/// Converts logical sort expressions to physical sort expressions
+///
+/// This function transforms a collection of logical sort expressions into
their physical
+/// representation that can be used during query execution.
+///
+/// # Arguments
+///
+/// * `schema` - The schema containing column definitions
+/// * `sort_order` - A collection of logical sort expressions grouped into
lexicographic orderings
+///
+/// # Returns
+///
+/// A vector of lexicographic orderings for physical execution, or an error if
the transformation fails
+///
+/// # Examples
+///
+/// ```
+/// // Create orderings from columns "id" and "name"
+/// use arrow::datatypes::{Schema, Field, DataType};
+/// use datafusion::datasource::create_ordering;
+/// use datafusion_common::Column;
+/// use datafusion_expr::{Expr, SortExpr};
+///
Review Comment:
If you put `#` in front of these lines they are hidden from the docs and the
example is shorter
```suggestion
/// # use arrow::datatypes::{Schema, Field, DataType};
/// # use datafusion::datasource::create_ordering;
/// # use datafusion_common::Column;
/// # use datafusion_expr::{Expr, SortExpr};
/// #
```
--
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]