timsaucer commented on code in PR #867:
URL: https://github.com/apache/datafusion-python/pull/867#discussion_r1763929659
##########
python/datafusion/expr.py:
##########
@@ -84,7 +85,7 @@
ScalarVariable = expr_internal.ScalarVariable
SimilarTo = expr_internal.SimilarTo
Sort = expr_internal.Sort
-SortExpr = expr_internal.SortExpr
+# SortExpr = expr_internal.SortExpr
Review Comment:
can remove
##########
python/datafusion/expr.py:
##########
@@ -643,3 +677,27 @@ def end(self) -> Expr:
Any non-matching cases will end in a `null` value.
"""
return Expr(self.case_builder.end())
+
+
+class SortExpr:
+ """Used to specify sorting on either a DataFrame or function."""
+
+ def __init__(self, expr: Expr, ascending: bool, nulls_first: bool) -> None:
+ """This constructor should not be called by the end user."""
+ self.raw_sort = expr_internal.SortExpr(expr, ascending, nulls_first)
+
+ def expr(self) -> Expr:
+ """Return the raw expr backing teh SortExpr."""
Review Comment:
typo `teh`
--
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]