Skip to content

Commit d58ae94

Browse files
committed
Add docstring comments to SortExpr python class
1 parent b46596d commit d58ae94

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

python/datafusion/expr.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
ScalarVariable = expr_internal.ScalarVariable
8585
SimilarTo = expr_internal.SimilarTo
8686
Sort = expr_internal.Sort
87-
SortExpr = expr_internal.SortExpr
87+
# SortExpr = expr_internal.SortExpr
8888
Subquery = expr_internal.Subquery
8989
SubqueryAlias = expr_internal.SubqueryAlias
9090
TableScan = expr_internal.TableScan
@@ -669,19 +669,24 @@ def end(self) -> Expr:
669669

670670

671671
class SortExpr:
672-
"""Used to specify sorting on either a DataFrame or function"""
672+
"""Used to specify sorting on either a DataFrame or function."""
673673

674674
def __init__(self, expr: Expr, ascending: bool, nulls_first: bool) -> None:
675+
"""This constructor should not be called by the end user."""
675676
self.raw_sort = expr_internal.SortExpr(expr, ascending, nulls_first)
676677

677678
def expr(self) -> Expr:
679+
"""Return the raw expr backing teh SortExpr."""
678680
return Expr(self.raw_sort.expr())
679681

680682
def ascending(self) -> bool:
683+
"""Return ascending property."""
681684
return self.raw_sort.ascending()
682685

683686
def nulls_first(self) -> bool:
687+
"""Return nulls_first property."""
684688
return self.raw_sort.nulls_first()
685689

686690
def __repr__(self) -> str:
691+
"""Generate a string representation of this expression."""
687692
return self.raw_sort.__repr__()

0 commit comments

Comments
 (0)