LuciferYang commented on code in PR #44639:
URL: https://github.com/apache/spark/pull/44639#discussion_r1446915049
##########
python/pyspark/sql/functions/builtin.py:
##########
@@ -14968,11 +15006,12 @@ def schema_of_csv(csv: Union[Column, str], options:
Optional[Dict[str, str]] = N
return _invoke_function("schema_of_csv", col, _options_to_str(options))
-
+# TODO(SPARK-46654) Re-enable the `Example 2` test after fixing the display
Review Comment:
`Example 2: Converting a complex StructType to a CSV string` displayed
different results between Regular Spark and Spark Connect, skip test it in this
pr and add `TODO(SPARK-46654)`:
```
**********************************************************************
3953File "/__w/spark/spark/python/pyspark/sql/connect/functions/builtin.py",
line 2232, in pyspark.sql.connect.functions.builtin.to_csv
3954Failed example:
3955 df.select(sf.to_csv(df.value)).show(truncate=False)
3956Expected:
3957 +-----------------------+
3958 |to_csv(value) |
3959 +-----------------------+
3960 |2,Alice,"[100,200,300]"|
3961 +-----------------------+
3962Got:
3963
+--------------------------------------------------------------------------+
3964 |to_csv(value)
|
3965
+--------------------------------------------------------------------------+
3966
|2,Alice,org.apache.spark.sql.catalyst.expressions.UnsafeArrayData@99c5e30f|
3967
+--------------------------------------------------------------------------+
3968 <BLANKLINE>
3969**********************************************************************
3970 1 of 18 in pyspark.sql.connect.functions.builtin.to_csv
3971***Test Failed*** 1 failures.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]