[ 
https://issues.apache.org/jira/browse/SPARK-12105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16435019#comment-16435019
 ] 

Takeshi Yamamuro commented on SPARK-12105:
------------------------------------------

I feel it is enough to use Console?
{code}
val outputStream = new java.io.ByteArrayOutputStream()
val out = new java.io.PrintStream(outputStream, true);
Console.withOut(out) { Seq(1, 2, 3, 4).toDS.show() }
scala> outputStream.toString
res1: String =
"+-----+
|value|
+-----+
|    1|
|    2|
|    3|
|    4|
+-----+

"
{code}

> Add a DataFrame.show() with argument for output PrintStream
> -----------------------------------------------------------
>
>                 Key: SPARK-12105
>                 URL: https://issues.apache.org/jira/browse/SPARK-12105
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 1.5.2
>            Reporter: Dean Wampler
>            Priority: Minor
>
> It would be nice to send the output of DataFrame.show(...) to a different 
> output stream than stdout, including just capturing the string itself. This 
> is useful, e.g., for testing. Actually, it would be sufficient and perhaps 
> better to just make DataFrame.showString a public method, 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to