GitHub user zsxwing opened a pull request:

    https://github.com/apache/spark/pull/6877

    [SPARK-8434][SQL]Add a "pretty" parameter to show to display long strings

    Sometimes the user may want to show the complete content of cells. Now 
`sql("set -v").show()` displays:
    
    ![screen shot 2015-06-18 at 4 34 51 
pm](https://cloud.githubusercontent.com/assets/1000778/8227339/14d3c5ea-15d9-11e5-99b9-f00b7e93beef.png)
    
    The user needs to use something like `sql("set -v").collect().foreach(r => 
r.toSeq.mkString("\t"))` to show the complete content.
    
    This PR adds a `pretty` parameter to show. If `pretty` is false, `show` 
won't truncate strings or align cells right. 
    
    ![screen shot 2015-06-18 at 4 21 44 
pm](https://cloud.githubusercontent.com/assets/1000778/8227407/b6f8dcac-15d9-11e5-8219-8079280d76fc.png)
    
    
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zsxwing/spark show

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/6877.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6877
    
----
commit 923cee4586f5747ad596deefc352aac0429a2dc1
Author: zsxwing <[email protected]>
Date:   2015-06-18T08:23:11Z

    Add a "pretty" parameter to show to display long strings

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to