Yicong Huang created SPARK-59555:
------------------------------------
Summary: Fix flaky DataFrameReader.json doctest by sorting
multi-directory read
Key: SPARK-59555
URL: https://issues.apache.org/jira/browse/SPARK-59555
Project: Spark
Issue Type: Bug
Components: PySpark
Affects Versions: 5.0.0
Reporter: Yicong Huang
Example 2 in `DataFrameReader.json` docstring reads two directories `[d1, d2]`
(two rows across two dirs) and calls `.show()` without ordering, so the row
order is nondeterministic and the doctest fails ~50% of the time. Add
`.sort("name")` for deterministic output, consistent with Example 4 and the
parquet/text examples in the same file. The expected output block is unchanged
(Alice, Bob is already sorted).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]