Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions python/pyspark/sql/tests/connect/test_connect_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
if have_pandas:
from pyspark.sql.connect.session import SparkSession as RemoteSparkSession
from pyspark.sql.connect.client import ChannelBuilder
from pyspark.sql.connect.dataframe import DataFrame as CDataFrame
from pyspark.sql.connect.function_builder import udf
from pyspark.sql.connect.functions import lit, col
from pyspark.testing.pandasutils import PandasOnSparkTestCase
else:
from pyspark.testing.sqlutils import ReusedSQLTestCase as PandasOnSparkTestCase # type: ignore
from pyspark.sql.dataframe import DataFrame
import pyspark.sql.functions
from pyspark.sql.connect.dataframe import DataFrame as CDataFrame
from pyspark.testing.connectutils import should_test_connect, connect_requirement_message
from pyspark.testing.pandasutils import PandasOnSparkTestCase
from pyspark.testing.utils import ReusedPySparkTestCase


Expand Down Expand Up @@ -881,6 +883,7 @@ def test_crossjoin(self):
)


@unittest.skipIf(not should_test_connect, connect_requirement_message)
class ChannelBuilderTests(ReusedPySparkTestCase):
def test_invalid_connection_strings(self):
invalid = [
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/sql/tests/connect/test_connect_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from pyspark.sql.connect.session import SparkSession as RemoteSparkSession
from pyspark.testing.pandasutils import PandasOnSparkTestCase
else:
from pyspark.testing.sqlutils import ReusedSQLTestCase as PandasOnSparkTestCase
from pyspark.testing.sqlutils import ReusedSQLTestCase as PandasOnSparkTestCase # type: ignore
from pyspark.sql.dataframe import DataFrame
from pyspark.testing.connectutils import should_test_connect, connect_requirement_message
from pyspark.testing.utils import ReusedPySparkTestCase
Expand Down
1 change: 1 addition & 0 deletions python/pyspark/testing/connectutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def _session_sql(cls, query: str) -> "DataFrame":
return DataFrame.withPlan(SQL(query), cls.connect) # type: ignore

if have_pandas:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but I piggy-back this python-style fix. This style issue is introduced in the previous commit separately today.

$ dev/reformat-python
reformatted python/pyspark/testing/connectutils.py

All done! ✨ 🍰 ✨
1 file reformatted, 391 files left unchanged.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@classmethod
def _with_plan(cls, plan: LogicalPlan) -> "DataFrame":
return DataFrame.withPlan(plan, cls.connect) # type: ignore
Expand Down