amaliujia commented on code in PR #38826:
URL: https://github.com/apache/spark/pull/38826#discussion_r1034141214


##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -325,10 +325,14 @@ def drop(self, *cols: "ColumnOrName") -> "DataFrame":
             session=self._session,
         )
 
-    def filter(self, condition: Expression) -> "DataFrame":
-        return DataFrame.withPlan(
-            plan.Filter(child=self._plan, filter=condition), 
session=self._session
-        )
+    def filter(self, condition: Union[Expression, str]) -> "DataFrame":
+        # The expression can be a SQL string expression.

Review Comment:
   Nit:
   
   I think this comment is a bit redundant as the code below is self-explained.



-- 
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]

Reply via email to