Skip to content

[SPARK-41824][CONNECT][PYTHON] Ingore the doctest for explain of connect#39436

Closed
beliefer wants to merge 2 commits intoapache:masterfrom
beliefer:SPARK-41824
Closed

[SPARK-41824][CONNECT][PYTHON] Ingore the doctest for explain of connect#39436
beliefer wants to merge 2 commits intoapache:masterfrom
beliefer:SPARK-41824

Conversation

@beliefer
Copy link
Contributor

@beliefer beliefer commented Jan 7, 2023

What changes were proposed in this pull request?

Currently, the output of explain API is different between pyspark, scala and connect.
There already created a dataframe with
df = spark.createDataFrame([(14, "Tom"), (23, "Alice"), (16, "Bob")], ["age", "name"])
and then execute
df.explain()
The output of pyspark show below.

    == Physical Plan ==
    *(1) Scan ExistingRDD[age...,name...]

But the scala and connect API output different content.

    == Physical Plan ==
    LocalTableScan [age#1148L, name#1149]
    <BLANKLINE>
    <BLANKLINE>

The similar issue occurs when executing df.explain(mode="formatted") too.

It's actually implementation details in PySpark. It would be difficult to make it matched. So this PR want ignore the two doc tests.

Why are the changes needed?

Currently, the output of explain API is different between pyspark, scala and connect.
This PR want ignore the two doc tests.

Does this PR introduce any user-facing change?

'No'.
New feature.

How was this patch tested?

Manual tests.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

Let's remove the comment with the JIRA number too. LGTM otherwise.

@HyukjinKwon
Copy link
Member

Merged to master.

@zhengruifeng
Copy link
Contributor

LGTM, thank you @beliefer

the df in PySpark will create a RDD at first, which can not be matched in Connect

@beliefer
Copy link
Contributor Author

beliefer commented Jan 7, 2023

@HyukjinKwon @zhengruifeng Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants