[
https://issues.apache.org/jira/browse/SPARK-7435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14533478#comment-14533478
]
Shivaram Venkataraman commented on SPARK-7435:
----------------------------------------------
The problem with this is that `show` is a reserved keyword in R -- the show
method gets called when you just type in the name of a variable. For example if
we have
```
> df <- jsonFile(sqlCtx, "./examples/src/main/resources/people.json")
> df
DataFrame[age:bigint, name:string]
```
So this print statement comes from `show` here and we should maintain this
behavior as this is similar to the behavior in spark-shell, pyspark and is
natural.
Actually I might be in favor of getting rid of `showDF` -- We already have
`head` which does the same thing ?
> Make DataFrame.show() consistent with that of Scala and pySpark
> ---------------------------------------------------------------
>
> Key: SPARK-7435
> URL: https://issues.apache.org/jira/browse/SPARK-7435
> Project: Spark
> Issue Type: Improvement
> Components: SparkR
> Affects Versions: 1.4.0
> Reporter: Sun Rui
> Priority: Blocker
>
> Currently in SparkR, DataFrame has two methods show() and showDF(). show()
> prints the DataFrame column names and types and showDF() prints the first
> numRows rows of a DataFrame.
> In Scala and pySpark, show() is used to prints rows of a DataFrame.
> We'd better keep API consistent unless there is some important reason. So
> propose to interchange the names (show() and showDF()) in SparkR.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]