Tian Gao created SPARK-61827:
--------------------------------
Summary: Add tests for DataFrameWriterV2 write modes, options and
properties
Key: SPARK-61827
URL: https://issues.apache.org/jira/browse/SPARK-61827
Project: Spark
Issue Type: Test
Components: PySpark
Affects Versions: 5.0.0
Reporter: Tian Gao
12 lines of `WriteOperationV2.command` in `python/pyspark/sql/connect/plan.py`
were not covered by any test. This method builds the Spark Connect proto for
`DataFrameWriterV2`. The existing tests only call `create()` and `overwrite()`
and never pass options or table properties, so the serialization of
`option`/`tableProperty` and of the `replace`, `createOrReplace`, `append` and
`overwritePartitions` modes never ran. With this test 12 of the 15 previously
uncovered lines in the method are covered. The rest are the `None` value
branches, which the public `option()`/`tableProperty()` methods never produce,
and the fallback for an unknown mode, which no public method can reach.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]