[ 
https://issues.apache.org/jira/browse/SPARK-60991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon resolved SPARK-60991.
----------------------------------
    Resolution: Fixed

Issue resolved by pull request 194
[https://github.com/apache/spark-connect-rust/pull/194]

> Show a DataFrame as the server formats it, with truncate and vertical, in 
> Spark Connect Rust as PySpark does
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-60991
>                 URL: https://issues.apache.org/jira/browse/SPARK-60991
>             Project: Spark
>          Issue Type: Bug
>          Components: Connect
>    Affects Versions: connect-rust-4.3.0
>            Reporter: Hyukjin Kwon
>            Assignee: Hyukjin Kwon
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: connect-rust-4.3.0
>
>
> In PySpark Connect, {{DataFrame.show(n=20, truncate=True, vertical=False)}} 
> sends a {{ShowString}} relation with the number of rows, the truncation and 
> the vertical flag, and prints the table that the server formats:
> {noformat}
> +---+
> | id|
> +---+
> |  0|
> |  1|
> +---+
> {noformat}
> It raises {{PySparkTypeError}} {{NOT_EXPECTED_TYPE}} for an {{n}} that is not 
> an int, a {{vertical}} that is not a bool, and a {{truncate}} that is 
> neither. The Rust-backed Python client collects the first {{n}} rows and 
> prints each with Rust's {{println!}}, as {{[0]}} and {{[1]}}, ignoring 
> {{truncate}} and {{vertical}} and writing past Python's {{sys.stdout}}, so a 
> notebook or {{contextlib.redirect_stdout}} does not get the output. The Rust 
> {{DataFrame::show}} prints the same. Show the DataFrame as PySpark does.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to