Skip to content

Commit b6a0204

Browse files
committed
Improve error message in DataFrame sorting to provide clearer guidance on expression construction
1 parent 767df54 commit b6a0204

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/datafusion/dataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def sort(self, *exprs: Expr | SortExpr | str) -> DataFrame:
563563
else:
564564
error = (
565565
"Expected Expr or column name, found:"
566-
f" {type(e).__name__}. Use col() or lit() to construct expressions."
566+
f" {type(e).__name__}. {_EXPR_TYPE_ERROR}."
567567
)
568568
raise TypeError(error)
569569
return DataFrame(self.df.sort(*exprs_raw))

0 commit comments

Comments
 (0)