Uh oh!
There was an error while loading. Please reload this page.
SPARK-12105 - SPARK-SQL add convenient show functions - #10130
Conversation
jbonofre
commented
Dec 4, 2015
Rebase |
b721fb2 to
61dd094CompareThere was a problem hiding this comment.
these signatures are really clunky and I don't think we want it. Also the string is already composed so it's not like we're streaming things to the writer anyway.
andrewor14
commented
Dec 11, 2015
@jbonofre I think it might be sufficient to just expose |
andrewor14
commented
Dec 11, 2015
add to whitelist |
SparkQA
commented
Dec 11, 2015
Test build #47589 has finished for PR 10130 at commit
|
jbonofre
commented
Dec 11, 2015
Thanks for the update @andrewor14. It makes sense for the new functions(). Exposing the showString() is enough for most of the cases. Let me update the PR. |
SparkQA
commented
Dec 12, 2015
Test build #47594 has finished for PR 10130 at commit
|
SparkQA
commented
Dec 15, 2015
Test build #47720 has finished for PR 10130 at commit
|
There was a problem hiding this comment.
remove ;, this is scala. I'll fix this on merge
andrewor14
commented
Dec 16, 2015
Merged into master. |
rxin
commented
Dec 16, 2015
Sorry I reverted the patch. Please check with me on the API change in the future. First I'm not 100% sure whether we want this (we might, just not sure yet), and then there are problems with the API (e.g. we should not use any default values for Java compatibility). Last but not least, if we want to do this, we should have it also for Python. |
jbonofre
commented
Dec 16, 2015
Hi Reynold. No problem, I just proposed the PR as least to discuss, and I think it's convenient for users. Thanks. |
jbonofre
commented
Dec 16, 2015
By the way, let me know if you want the change, I can extend to Python API as well. And what do you mean by default values about Java compatibility ? |
rxin
commented
Dec 17, 2015
Default parameter values only work in Scala, not Java. |
jjzazuet
commented
Apr 11, 2018
Hi. So it's 2018 and I also vouch for having this method exposed as public to capture into logs in the driver program. Thanks! |
dmateusp
commented
Jul 6, 2018
+1 any chance we can revive this PR ? |
tmccartan
commented
Jul 6, 2018
+1 |
+1 , it think would be very useful to get the show as string, to inject into logs, we are currently forced to use workarounds like packageorg.apache.spark.sqlobjectAccessShowString {
defshowString[T](df: Dataset[T],
_numRows: Int, truncate: Int=20, vertical: Boolean=false):String= {
df.showString(_numRows, truncate, vertical)
}
}or defdataFrameToString(df: DataFrame, numRows: Int=20, truncate: Int=20):String= {
valoutput=newByteArrayOutputStream()
valprintStream=newPrintStream(output)
Console.withOut(printStream) {
df.show(numRows, truncate)
}
output.toString.trim
}(solutions from stackoverflow) which is bad @rxin would it be possible to reopen the issue or consider changing the visibility ? Thanks |
No description provided.