You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by emlyn <gi...@git.apache.org> on 2017/01/17 00:53:20 UTC

[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

GitHub user emlyn opened a pull request:

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

    [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for Dataframe

    ## What changes were proposed in this pull request?
    
    Add name / setName to Dataset/DataFrame in all languages, to match RDD (continuation of #15343)
    
    ## How was this patch tested?
    
    New unit tests added for these methods.
    And by hand by running in spark-shell:
    ```scala
    scala> Seq(1, 2, 3, 4).toDS().setName("Foo Bar").cache().show()
    +-----+
    |value|
    +-----+
    |    1|
    |    2|
    |    3|
    |    4|
    +-----+
    ```
    Gives this in the UI storage tab:
    <img width="895" alt="screen shot 2017-01-17 at 00 48 03" src="https://cloud.githubusercontent.com/assets/405237/22003836/a94eb8f0-dc4e-11e6-991f-0237e73735f8.png">
    
    Thanks to @srowen for most of the work, I just passed the name through to the cache manager so that it appears on the UI. I'll look into incorporating the review comments from #15343.

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

    $ git pull https://github.com/emlyn/spark SPARK-8480

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

    https://github.com/apache/spark/pull/16609.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 #16609
    
----
commit 02c48002c3e0169cac501e422558049fc9caeaf1
Author: Sean Owen <so...@cloudera.com>
Date:   2016-10-04T13:36:56Z

    Add setName to Dataset/DataFrame

commit 9af811c72421d06afb2e18078a1a7dc817b9a76b
Author: Emlyn Corrin <em...@microsoft.com>
Date:   2017-01-17T00:00:13Z

    Pass Dataset name through to cache manager

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by phatak-dev <gi...@git.apache.org>.
Github user phatak-dev commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @gatorsmile sure. I will give a PR.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97216620
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -172,6 +172,29 @@ class Dataset[T] private[sql](
         this(sqlContext.sparkSession, logicalPlan, encoder)
       }
     
    +  /**
    +    * A friendly name for this Dataset.
    +    *
    +    * @group basic
    +    * @since 2.2.0
    +    */
    --- End diff --
    
    Indents are wrong.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97192814
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    +#'}
    +#' @aliases storageName,SparkDataFrame-method
    +#' @export
    +#' @note storageName since 2.2.0
    +setMethod("storageName",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    +          })
    +
    +#' storageName
    +#'
    +#' Set a SparkDataFrame's name. This will be displayed on the Storage tab in the UI if cached.
    +#'
    +#' @param x The SparkDataFrame whose name is to be set.
    +#' @param name The SparkDataFrame name to be set.
    --- End diff --
    
    change this `name` to `value`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97210306
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -85,6 +85,24 @@ def rdd(self):
                 self._lazy_rdd = RDD(jrdd, self.sql_ctx._sc, BatchedSerializer(PickleSerializer()))
             return self._lazy_rdd
     
    +    @since(2.1)
    --- End diff --
    
    since 2.2?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    No, RDD APIs are not supported in SparkR.
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by shivaram <gi...@git.apache.org>.
Github user shivaram commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    If this is just for the storage tab, something like `storageName` could be enough ? As @felixcheung  said R users might not know what an RDD so I'd avoid introducing that in the name


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97122149
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    +#'}
    +#' @aliases storageName,SparkDataFrame-method
    +#' @export
    +#' @note name since 2.2.0
    +setMethod("storageName",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    --- End diff --
    
    if name() return void, this should be wrapped like `invisible(callJMethod(x@sdf, "name"))`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by phatak-dev <gi...@git.apache.org>.
Github user phatak-dev commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    cacheTable API doesn't allow user to change the storage level. So having a setName is useful so that we can cache the dataframe in  different storage level and still use the UI to identify the dataframe.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    I'm happy for this to be closed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    As far as I'm concerned it's only to help identify entries on the UI storage tab (although others may have other ideas), so `storageName` sounds fine to me.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by ivanko2000 <gi...@git.apache.org>.
Github user ivanko2000 commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    I am a Spark newbie so I might not be aware of some obvious features, but nonetheless: I consider the usefulness of a metadata field like "name" (not necessarily unique on a global/session level) for a DataFrame/Dataset object to go beyond the purely visual UI/'storage tab' use case (which apparently can be achieved through other means, like temp view).
    
    It could be used as an identifier/selector in a collection of dataframes, either for internal 'business' logic or for integration purposes with 'outside' components that could expose those dataframes with a human-readable name if the developer/owner considered it useful to assign one (the latter does seem similar to the "temp view" use case, but here the name/label is strictly a metadata element of the dataframe itself, so there is no need to track is separately).
    
    Actually, I see that the Dataset's **as**(_alias_) can be used just for that purpose: although it appears to be a "set-only" property (for use as 'alias' in SQL queries) and not intended to be read back, there is a fairly straightforward way of retrieving it:
    http://stackoverflow.com/questions/41249806/how-can-i-retrieve-the-alias-for-a-dataframe-in-spark
    However, since the "accessor" appears to be version-sensitive, it would be preferable to have a stable public  accessor for this name/alias property.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r101895951
  
    --- Diff: python/pyspark/rdd.py ---
    @@ -2169,9 +2169,7 @@ def name(self):
             """
             Return the name of this RDD.
             """
    -        n = self._jrdd.name()
    -        if n:
    -            return n
    +        return self._jrdd.name()
    --- End diff --
    
    Maybe, we should avoid unrelated change although I understand this is semantically clear.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r96463712
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' name
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname name
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' df.name()
    --- End diff --
    
    the R syntax should be `name(df)`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    thanks, @emlyn could you add R tests for this?
    but before we go there, I do still think it is confusing if it is one character different from a very well established convention to set/get names in R [`names`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/names.html), especially considering auto completion rule in shell/IDE. 
    
    @shivaram what do you think? should we aim for consistency across all languages, or break away only R to avoid potential confusion?
    Or, is there a more fitting names for all languages?



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    Jenkins, test this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97192807
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    --- End diff --
    
    since they have the same `rdname` instead of two blocks of examples you should merge into one.
    In that case it would make more sense to check `storageName` - here checking without setting it first doesn't seem to make a lot of sense?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97210569
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -322,6 +333,9 @@ class Dataset[T] private[sql](
       }
     
       override def toString: String = {
    +    if (name != null) {
    +      return name
    +    }
    --- End diff --
    
    The storage tab gets it from the cache manager (which gets it via Dataset.persist()). I think this is what will be displayed when the Dataset is printed in the repl, I'm not sure if it's also used elsewhere.
    Given that there's also a .name method I agree that it would be nice to keep the schema in here. I'll add it in, but will need to update the tests to take that into account.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97121577
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    +#'}
    +#' @aliases storageName,SparkDataFrame-method
    +#' @export
    +#' @note name since 2.2.0
    +setMethod("storageName",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    +          })
    +
    +#' storageName
    +#'
    +#' Set a SparkDataFrame's name. This will be displayed on the Storage tab in the UI if cached.
    +#'
    +#' @param x The SparkDataFrame whose name is to be set.
    +#' @param name The SparkDataFrame name to be set.
    +#' @family SparkDataFrame functions
    +#' @return the SparkDataFrame renamed.
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df) <- "foo"
    +#'}
    +#' @aliases name<-,SparkDataFrame-method
    --- End diff --
    
    this should be updated


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97123916
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    +#'}
    +#' @aliases storageName,SparkDataFrame-method
    +#' @export
    +#' @note name since 2.2.0
    +setMethod("storageName",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    +          })
    +
    +#' storageName
    +#'
    +#' Set a SparkDataFrame's name. This will be displayed on the Storage tab in the UI if cached.
    +#'
    +#' @param x The SparkDataFrame whose name is to be set.
    +#' @param name The SparkDataFrame name to be set.
    +#' @family SparkDataFrame functions
    +#' @return the SparkDataFrame renamed.
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df) <- "foo"
    +#'}
    +#' @aliases name<-,SparkDataFrame-method
    +#' @export
    +#' @note name<- since 2.2.0
    +setMethod("storageName<-",
    +          signature(x = "SparkDataFrame", name = "character"),
    +          function(x, name) {
    +            callJMethod(x@sdf, "setName", name)
    +            x
    --- End diff --
    
    as mentioned, we need to add test in R for this.
    I think this might not work as expected - could you test this
    ```
    storageName(df) <- "foo"
    storageName(df) == "foo"
    ```



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by michaelmior <gi...@git.apache.org>.
Github user michaelmior commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    Is there any way to create a name without caching the result? I'm parsing the Spark event logs to get some additional data about jobs and having names there is very helpful but I don't want to affect the behaviour of the application.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @holdenk @davies I've adjusted the Python return pattern as mentioned in the original PR (also in rdd.py), is this OK?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97216614
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -172,6 +172,29 @@ class Dataset[T] private[sql](
         this(sqlContext.sparkSession, logicalPlan, encoder)
       }
     
    +  /**
    +    * A friendly name for this Dataset.
    +    *
    +    * @group basic
    +    * @since 2.2.0
    +    */
    +  @Since("2.2.0")
    +  var name: String = null
    --- End diff --
    
    We do not use `null`. Why not using `Option`?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97192829
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    +#'}
    +#' @aliases storageName,SparkDataFrame-method
    +#' @export
    +#' @note storageName since 2.2.0
    +setMethod("storageName",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    +          })
    +
    +#' storageName
    +#'
    +#' Set a SparkDataFrame's name. This will be displayed on the Storage tab in the UI if cached.
    +#'
    +#' @param x The SparkDataFrame whose name is to be set.
    +#' @param name The SparkDataFrame name to be set.
    +#' @family SparkDataFrame functions
    +#' @return the SparkDataFrame renamed.
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df) <- "foo"
    --- End diff --
    
    since it won't be useful unless it is cached, suggest add in the example here `cache(df)`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97214402
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -85,17 +85,20 @@ def rdd(self):
                 self._lazy_rdd = RDD(jrdd, self.sql_ctx._sc, BatchedSerializer(PickleSerializer()))
             return self._lazy_rdd
     
    -    @since(2.1)
    +    @since(2.2)
         def name(self):
             """
             Return the name of this Dataset.
             """
             return self._jdf.name()
     
         @ignore_unicode_prefix
    -    @since(2.1)
    +    @since(2.2)
         def setName(self, name):
    -        """
    +        """Sets the name of this Dataset.
    +
    +        The name wil be displayed on the storage tab of the UI if the Dataset is cached.
    --- End diff --
    
    `wil` -> `will`?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r96399989
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,49 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' Return an SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @rdname name
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' df.name()
    +#'}
    +#' @aliases name,SparkDataFrame-method
    +#' @noRd
    +#' @note explain since 2.1.0
    +setMethod("name",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    +          })
    +
    +#' Set an SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is to be set.
    +#' @param name The SparkDataFrame name to be set.
    +#' @return a new SparkDataFrame renamed.
    +#' @rdname setName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' df.setName("foo")
    +#'}
    +#' @aliases setName,SparkDataFrame-method
    +#' @noRd
    +#' @note explain since 2.1.0
    --- End diff --
    
    All of the "2.1.0" needs to be "2.2.0" at least


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    If this is for display, I like the change. However, I am afraid it might introduce some side effects. 
    
    In this PR, the major changes I have a concern are the following two functions:
    ```Scala
      def persist(): this.type = {
        sparkSession.sharedState.cacheManager.cacheQuery(this, Option(name))
        this
      }
    
      def persist(newLevel: StorageLevel): this.type = {
        sparkSession.sharedState.cacheManager.cacheQuery(this, Option(name), newLevel)
        this
      }
    ```
    
    Before jumping to the new changes, let us see how we are using `cacheQuery`.
    ```Scala
      def cacheQuery(
          query: Dataset[_],
          tableName: Option[String] = None,
          storageLevel: StorageLevel = MEMORY_AND_DISK)
    ```
    
    `cacheQuery` is the API to cache the data produced by the logical representation of the given [[Dataset]]. The field `tableName` is used for display, but it is actually being used as an unique identifier, whose uniqueness is enfored by the Catalog. Let us show the APIs that are using the field `tableName`.
    
    ```Scala
      override def cacheTable(tableName: String): Unit = {
        sparkSession.sharedState.cacheManager.cacheQuery(sparkSession.table(tableName), Some(tableName))
      }
    
      override def uncacheTable(tableName: String): Unit = {
        sparkSession.sharedState.cacheManager.uncacheQuery(query = sparkSession.table(tableName))
      }
    ```
    
    When users calling `cacheTable`, we cache the result set of the logical plan of the table `tableName`. `tableName` is displayed in Storage tab as the RDD Name, but users can use the same name to get the logical plan to uncache the data.
    
    This PR is trying to use the same field `tableName` for display, but users are unable to use the name to uncache the data. This looks confusing to me. I am not sure whether the others have the same concern. 
    
    IMO, a DataFrame/Dataset is like a temporary view. When we set a name to DataFrame or Dataset, we basically create a named view. If we cache it, we are putting it to a cross-session memory cache. 
    
    If we really need to improve the usability, I think we might be able to register the dataFrame/dataset as a global temporary view, or improve the existing cache management with something similar to global view management. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    Nice, all I really want is a way to identify the RDDs in the storage tab, I didn't realise it was possible with a temp view (but I think the second line should be `df.sparkSession.catalog.cacheTable("abc")`).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @felixcheung oh, in that case should the existing ones in RDD.R be made public (and possibly renamed)? They are public in the Python/Java/Scala APIs.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @emlyn I'm not sure this should be associated with RDD, since we are working with DataFrame here?
    As for the existing `name` methods in RDD.R - they are not public APIs


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r96463856
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' name
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname name
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' df.name()
    +#'}
    +#' @aliases name,SparkDataFrame-method
    +#' @export
    +#' @note name since 2.2.0
    +setMethod("name",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    +          })
    +
    +#' name
    +#'
    +#' Set a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is to be set.
    +#' @param name The SparkDataFrame name to be set.
    +#' @family SparkDataFrame functions
    +#' @return a new SparkDataFrame renamed.
    --- End diff --
    
    hmm, this isn't a new DataFrame though?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97210341
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -322,6 +333,9 @@ class Dataset[T] private[sql](
       }
     
       override def toString: String = {
    +    if (name != null) {
    +      return name
    +    }
    --- End diff --
    
    this used to show the schema which I think is useful - is this what get called on the storage tab? how about returning both name and schema?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    ok, are we closing this one?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @felixcheung @shivaram I agree it probably makes sense to rename it, what about `rddName`? Any other ideas?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    Please hold on. cc @rxin @marmbrus @yhuai @liancheng @cloud-fan 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @phatak-dev please open a JIRA ticket for this feature request, there is no hard limit that `cacheTable` can't take a storage level.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97192721
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    +#'}
    +#' @aliases storageName,SparkDataFrame-method
    +#' @export
    +#' @note name since 2.2.0
    +setMethod("storageName",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    +          })
    +
    +#' storageName
    +#'
    +#' Set a SparkDataFrame's name. This will be displayed on the Storage tab in the UI if cached.
    +#'
    +#' @param x The SparkDataFrame whose name is to be set.
    +#' @param name The SparkDataFrame name to be set.
    +#' @family SparkDataFrame functions
    +#' @return the SparkDataFrame renamed.
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df) <- "foo"
    +#'}
    +#' @aliases name<-,SparkDataFrame-method
    +#' @export
    +#' @note name<- since 2.2.0
    +setMethod("storageName<-",
    +          signature(x = "SparkDataFrame", name = "character"),
    +          function(x, name) {
    +            callJMethod(x@sdf, "setName", name)
    +            x
    --- End diff --
    
    for the setter (`something<-`) you have the make the first parameter `value` (change this from `name` you have here)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    When users are writing DataFrame/Spark SQL, will they care about RDD names?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97214411
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -85,17 +85,20 @@ def rdd(self):
                 self._lazy_rdd = RDD(jrdd, self.sql_ctx._sc, BatchedSerializer(PickleSerializer()))
             return self._lazy_rdd
     
    -    @since(2.1)
    +    @since(2.2)
         def name(self):
             """
             Return the name of this Dataset.
             """
             return self._jdf.name()
     
         @ignore_unicode_prefix
    -    @since(2.1)
    +    @since(2.2)
         def setName(self, name):
    -        """
    +        """Sets the name of this Dataset.
    +
    +        The name wil be displayed on the storage tab of the UI if the Dataset is cached.
    --- End diff --
    
    I'm not sure but maybe this should say "DataFrame" instead


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97123971
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    +#'}
    +#' @aliases storageName,SparkDataFrame-method
    +#' @export
    +#' @note name since 2.2.0
    --- End diff --
    
    here too


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    I've modified the name in R to `storageName`, does anyone have any opposition to that (or better ideas)?
    
    Does it need any more tests? I'm not sure if it's possible to test that the name appears on the storage tab?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    Can one of the admins verify this patch?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    I like this idea, named DataFrame is actually a temp view, we can ask users to do
    ```
    df.createTempView("abc")
    df.catalog.cacheTable("abc")
    ```
    if they want a name in the UI storage page.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97210324
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -172,6 +172,17 @@ class Dataset[T] private[sql](
         this(sqlContext.sparkSession, logicalPlan, encoder)
       }
     
    +  /** A friendly name for this Dataset */
    +  @Since("2.2.0")
    --- End diff --
    
    this doesn't seem like the convention for doc string. For example
    ```
       /**
        * Returns a Java list that contains randomly split Dataset with the provided weights.
        *
        * @param weights weights for splits, will be normalized if they don't sum to 1.
        * @param seed Seed for sampling.
        *
        * @group typedrel
        * @since 2.0.0
        */
    ```
    
    it should have param, group, since.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @gatorsmile I'm probably not experienced enough to get your point but the thrust of this is simply to give DataFrames a more reasonable name in the UI. Is the `toString` value currently used for something where it will break if it changes?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    Any more feedback on whether this is a reasonable way to go about this (or if not, what would be a better way)? I think some way of identifying RDDs on the storage tab would greatly improve its usefulness, it's currently very difficult to work out where any of the RDDs in there actually come from.
    Not being an expert on the internals of Spark, to me this looks very similar to the `name`/`setName` methods that already exist on `RDD`. What am I missing that makes this case different?
    Thanks.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @felixcheung I think I've addressed your comments from the original PR (although the similarity to `names` remains), but I'd appreciate you giving it another look over as I'm not very familiar with R.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by phatak-dev <gi...@git.apache.org>.
Github user phatak-dev commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @gatorsmile gave pr for the issue.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by shivaram <gi...@git.apache.org>.
Github user shivaram commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    Yeah `name` vs. `names` could be potentially confusing -- Do we have any alternate suggestions ? As this isn't a very commonly used construct I think it might be fine to have a different name in R ?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    @cloud-fan yes, this name appears in the storage tab of the UI.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97214415
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -172,11 +172,23 @@ class Dataset[T] private[sql](
         this(sqlContext.sparkSession, logicalPlan, encoder)
       }
     
    -  /** A friendly name for this Dataset */
    +  /**
    +    * A friendly name for this Dataset.
    +    *
    +    * @group basic
    +    * @since 2.2.0
    +    */
       @Since("2.2.0")
       var name: String = null
     
    -  /** Assign a name to this Dataset */
    +  /**
    +    * Assign a name to this Dataset to display in the UI storage tab when cached.
    +    *
    +    * @param name A friendly name for this Dataset
    --- End diff --
    
    `_name`?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    The JIRA https://issues.apache.org/jira/browse/SPARK-20495 was just opened. Please feel free to submit the PR 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    Thanks @felixcheung, that test now seems to pass, although I still get `Had test warnings or failures; see logs.`, and further up is:
    ```
    Error in loadVignetteBuilder(pkgdir, TRUE) :
      vignette builder 'knitr' not found
    Execution halted
    ```
    Doesn't look like it's related to these changes, maybe I need to set up something in my environment?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97121598
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    +#'}
    +#' @aliases storageName,SparkDataFrame-method
    +#' @export
    +#' @note name since 2.2.0
    +setMethod("storageName",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    +          })
    +
    +#' storageName
    +#'
    +#' Set a SparkDataFrame's name. This will be displayed on the Storage tab in the UI if cached.
    +#'
    +#' @param x The SparkDataFrame whose name is to be set.
    +#' @param name The SparkDataFrame name to be set.
    +#' @family SparkDataFrame functions
    +#' @return the SparkDataFrame renamed.
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df) <- "foo"
    +#'}
    +#' @aliases name<-,SparkDataFrame-method
    +#' @export
    +#' @note name<- since 2.2.0
    --- End diff --
    
    ditto


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97210315
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -85,6 +85,24 @@ def rdd(self):
                 self._lazy_rdd = RDD(jrdd, self.sql_ctx._sc, BatchedSerializer(PickleSerializer()))
             return self._lazy_rdd
     
    +    @since(2.1)
    +    def name(self):
    +        """
    +        Return the name of this Dataset.
    +        """
    +        return self._jdf.name()
    +
    +    @ignore_unicode_prefix
    +    @since(2.1)
    +    def setName(self, name):
    +        """
    +        >>> df = sc.parallelize(["bar"]).toDF()
    --- End diff --
    
    should have docstring above example?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97195418
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -78,6 +78,55 @@ dataFrame <- function(sdf, isCached = FALSE) {
     
     ############################ SparkDataFrame Methods ##############################################
     
    +#' storageName
    +#'
    +#' Return a SparkDataFrame's name.
    +#'
    +#' @param x The SparkDataFrame whose name is returned.
    +#' @family SparkDataFrame functions
    +#' @rdname storageName
    +#' @examples
    +#'\dontrun{
    +#' sparkR.session()
    +#' path <- "path/to/file.json"
    +#' df <- read.json(path)
    +#' storageName(df)
    +#'}
    +#' @aliases storageName,SparkDataFrame-method
    +#' @export
    +#' @note storageName since 2.2.0
    +setMethod("storageName",
    +          signature(x = "SparkDataFrame"),
    +          function(x) {
    +            callJMethod(x@sdf, "name")
    +          })
    +
    +#' storageName
    +#'
    +#' Set a SparkDataFrame's name. This will be displayed on the Storage tab in the UI if cached.
    +#'
    +#' @param x The SparkDataFrame whose name is to be set.
    +#' @param name The SparkDataFrame name to be set.
    --- End diff --
    
    it's going to fail test if you forget to change this...


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    I think I've renamed to storageName everywhere now. I had to add it to `generic.R` too, otherwise the tests complained. I tried to guess what to put there from surrounding entries, I hope I did it correctly.
    I've also added a test, which now fails with:
    ```
    Failed -------------------------------------------------------------------------
    1. Error: storageName on DataFrame (@test_sparkSQL.R#2608) ---------------------
    unused argument (value = "foobar")
    1: `storageName<-`(`*tmp*`, value = "foobar") at /tmp/spark/R/lib/SparkR/tests/testthat/test_sparkSQL.R:2608
    
    DONE ===========================================================================
    Error: Test failures
    Execution halted
    ```
    It also fails when running manually in `sparkR`:
    ```R
    > df <- createDataFrame(list(list(1)))
    > storageName(df)
    NULL
    > storageName(df) <- "foobar"
    Error in `storageName<-`(`*tmp*`, value = "foobar") :
      unused argument (value = "foobar")
    ```
    I'm not familiar with R, so not sure how to fix it. Any hints?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97210326
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -172,6 +172,17 @@ class Dataset[T] private[sql](
         this(sqlContext.sparkSession, logicalPlan, encoder)
       }
     
    +  /** A friendly name for this Dataset */
    +  @Since("2.2.0")
    +  var name: String = null
    +
    +  /** Assign a name to this Dataset */
    +  @Since("2.2.0")
    --- End diff --
    
    ditto here


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16609#discussion_r97192728
  
    --- Diff: R/pkg/R/generics.R ---
    @@ -624,6 +624,14 @@ setGeneric("saveAsTable", function(df, tableName, source = NULL, mode = "error",
       standardGeneric("saveAsTable")
     })
     
    +#' @rdname storageName
    +#' @export
    +setGeneric("storageName", function(x) { standardGeneric("storageName") })
    +
    +#' @rdname storageName
    +#' @export
    +setGeneric("storageName<-", function(x, name) { standardGeneric("storageName<-") })
    --- End diff --
    
    ditto


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    please do then, @emlyn - only the author of the PR can close the PR.
    thanks for working on this.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setNam...

Posted by emlyn <gi...@git.apache.org>.
Github user emlyn closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16609: [SPARK-8480] [CORE] [PYSPARK] [SPARKR] Add setName for D...

Posted by leobenkel <gi...@git.apache.org>.
Github user leobenkel commented on the issue:

    https://github.com/apache/spark/pull/16609
  
    I am confused about this thing. If I want to see my dataframe in the storage tab, i need to do:
    
    ```
    df.createGlobalTempView("myName")
    df.sparkSession.catalog.cacheTable("myName")
    ```
    Does that only give a name ? 
    Or is that caching it as well ? 
    
    What if prior to that I had 
    
    `df.persist(....)` 
    
    Will it be cached twice ? 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org