Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-48372][SPARK-45716][PYTHON][FOLLOW-UP] Remove unused helper method #46936

Closed
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
8 changes: 0 additions & 8 deletions python/pyspark/sql/connect/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1844,14 +1844,6 @@ def isStreaming(self) -> bool:
assert result is not None
return result

def _tree_string(self, level: Optional[int] = None) -> str:
query = self._plan.to_proto(self._session.client)
result = self._session.client._analyze(
method="tree_string", plan=query, level=level
).tree_string
assert result is not None
return result

def printSchema(self, level: Optional[int] = None) -> None:
if level:
print(self.schema.treeString(level))
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/sql/tests/connect/test_connect_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ def test_toDF(self):

def test_print_schema(self):
# SPARK-41216: Test print schema
tree_str = self.connect.sql("SELECT 1 AS X, 2 AS Y")._tree_string()
tree_str = self.connect.sql("SELECT 1 AS X, 2 AS Y").schema.treeString()
# root
# |-- X: integer (nullable = false)
# |-- Y: integer (nullable = false)
Expand Down