|
84 | 84 | ScalarVariable = expr_internal.ScalarVariable
|
85 | 85 | SimilarTo = expr_internal.SimilarTo
|
86 | 86 | Sort = expr_internal.Sort
|
87 |
| -SortExpr = expr_internal.SortExpr |
| 87 | +# SortExpr = expr_internal.SortExpr |
88 | 88 | Subquery = expr_internal.Subquery
|
89 | 89 | SubqueryAlias = expr_internal.SubqueryAlias
|
90 | 90 | TableScan = expr_internal.TableScan
|
@@ -669,19 +669,24 @@ def end(self) -> Expr:
|
669 | 669 |
|
670 | 670 |
|
671 | 671 | class SortExpr:
|
672 |
| - """Used to specify sorting on either a DataFrame or function""" |
| 672 | + """Used to specify sorting on either a DataFrame or function.""" |
673 | 673 |
|
674 | 674 | def __init__(self, expr: Expr, ascending: bool, nulls_first: bool) -> None:
|
| 675 | + """This constructor should not be called by the end user.""" |
675 | 676 | self.raw_sort = expr_internal.SortExpr(expr, ascending, nulls_first)
|
676 | 677 |
|
677 | 678 | def expr(self) -> Expr:
|
| 679 | + """Return the raw expr backing teh SortExpr.""" |
678 | 680 | return Expr(self.raw_sort.expr())
|
679 | 681 |
|
680 | 682 | def ascending(self) -> bool:
|
| 683 | + """Return ascending property.""" |
681 | 684 | return self.raw_sort.ascending()
|
682 | 685 |
|
683 | 686 | def nulls_first(self) -> bool:
|
| 687 | + """Return nulls_first property.""" |
684 | 688 | return self.raw_sort.nulls_first()
|
685 | 689 |
|
686 | 690 | def __repr__(self) -> str:
|
| 691 | + """Generate a string representation of this expression.""" |
687 | 692 | return self.raw_sort.__repr__()
|
0 commit comments