grundprinzip commented on code in PR #38541:
URL: https://github.com/apache/spark/pull/38541#discussion_r1040497034
##########
python/pyspark/testing/connectutils.py:
##########
@@ -91,6 +92,10 @@ def _session_range(
def _session_sql(cls, query: str) -> "DataFrame":
return DataFrame.withPlan(SQL(query), cls.connect) # type: ignore
+ @classmethod
+ def _with_plan(cls, plan: LogicalPlan) -> "DataFrame":
Review Comment:
> Hi, @amaliujia . Unfortunately, this seems to break downstream CIs again
by introducing `pandas` dependency back. In this PR, line 27 seems to be
insufficient because `_with_plan` is a `classmethod`.
>
> ```
>
> if have_pandas:
>
> ...
>
> from pyspark.sql.connect.plan import LogicalPlan
>
> ```
>
>
>
> The following error happens.
>
> ```
>
> NameError: name 'LogicalPlan' is not defined
>
> ```
I think we might be able to replace it with "LogicalPlan" in quotes and use
the typing conditional import.
--
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]