You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by sun-rui <gi...@git.apache.org> on 2015/12/02 08:43:43 UTC

[GitHub] spark pull request: [SPARK-11395][SPARKR][WIP] Support over and wi...

GitHub user sun-rui opened a pull request:

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

    [SPARK-11395][SPARKR][WIP] Support over and window specification in SparkR.

    

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

    $ git pull https://github.com/sun-rui/spark SPARK-11395

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

    https://github.com/apache/spark/pull/10094.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 #10094
    
----
commit 927fa99e40de5735c842a28bddf2dc7370ad8b71
Author: Sun Rui <ru...@intel.com>
Date:   2015-12-02T07:25:27Z

    [SPARK-11395][SPARKR] Support over and window specification 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 pull request: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-162509482
  
    Merged build finished. Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-215497242
  
    @sun-rui @felixcheung Sorry for letting this PR slip by, but can we bring this up to date ? I think it would be cool to have windowing included in 2.0.  Is the only thing we need to resolve here the API naming convention ?


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46909529
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    @shivaram, what's your opinion?


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r62152831
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,92 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname window.partitionBy
    +#' @name window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   window.partitionBy("col1", "col2")
    --- End diff --
    
    Can we give a full length example here ? i.e. how to use windowing with a query and what it means (something like what we have in the unit test ?)


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r62017364
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    Naming in Scala: Window.partitionBy - https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/DataFrameWindowSuite.scala#L30
    Window.orderBy - https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/DataFrameWindowSuite.scala#L41
    
    dplyr supports window functions, see https://cran.r-project.org/web/packages/dplyr/vignettes/window-functions.html
    
    but here window.* names are for factory methods in Scala, not window functions themselves. Refer to https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/expressions/Window.scala
    
    I am ok with "window.*". 


---
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: [SPARK-11395][SPARKR][WIP] Support over and wi...

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

    https://github.com/apache/spark/pull/10094#issuecomment-161287051
  
    Merged build finished. Test FAILed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-161327831
  
    **[Test build #47068 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47068/consoleFull)** for PR 10094 at commit [`0f53fba`](https://github.com/apache/spark/commit/0f53fba7d8c082e2d54935081cdc787563d1bf86).


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-161328379
  
    **[Test build #47068 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47068/consoleFull)** for PR 10094 at commit [`0f53fba`](https://github.com/apache/spark/commit/0f53fba7d8c082e2d54935081cdc787563d1bf86).
     * This patch **fails R style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

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


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r62125253
  
    --- Diff: R/pkg/inst/tests/testthat/test_sparkSQL.R ---
    @@ -2083,6 +2083,32 @@ test_that("dapply() on a DataFrame", {
       expect_identical(expected, result)
     })
     
    +test_that("Window functions on a DataFrame", {
    +  ssc <- callJMethod(sc, "sc")
    +  hiveCtx <- tryCatch({
    +    newJObject("org.apache.spark.sql.hive.test.TestHiveContext", ssc)
    +  },
    +  error = function(err) {
    +    skip("Hive is not build with SparkSQL, skipped")
    +  })
    +
    +  df <- createDataFrame(hiveCtx,
    +                        list(list(1L, "1"), list(2L, "2"), list(1L, "1"), list(2L, "2")),
    +                        schema = c("key", "value"))
    +  ws <- orderBy(Window.partitionBy("key"), "value")
    +  result <- collect(select(df, over(lead("key", 1), ws), over(lead("value", 1), ws)))
    +  names(result) <- c("key", "value")
    +  expected <- data.frame(key = c(1L, NA, 2L, NA),
    +                       value = c("1", NA, "2", NA),
    +                       stringsAsFactors = FALSE)
    +  expect_equal(result, expected)
    +
    +  ws <- partitionBy(Window.orderBy("value"), "key")
    --- End diff --
    
    Would be good to have a unit test with a column (i.e. `df$key`) as well


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217201628
  
    Thanks @sun-rui - LGTM. @felixcheung Any other comments ? 


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217155342
  
    Merged build finished. Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-162781291
  
    **[Test build #47303 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47303/consoleFull)** for PR 10094 at commit [`ef08092`](https://github.com/apache/spark/commit/ef08092f3e49fe95cf13412a6bbf1d9404d4becf).
     * This patch passes all tests.
     * This patch **does not merge cleanly**.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217155344
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57883/
    Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46877854
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    Is it better to start with lower case 'w'? It seems to me functions in R generally starts lowered-case


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46469577
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    is it a good idea to have `.` in method 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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46792542
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    More explaination for naming of Window.partitionBy() and Window.orderBy(): I could use partitionBy() and orderBy(), but I think it is a little bit confusing. Such naming scheme is consistent with usage in Scala, for example, https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameWindowSuite.scala#L31 and https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameWindowSuite.scala#L42


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-216477747
  
    **[Test build #57619 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57619/consoleFull)** for PR 10094 at commit [`fbcfb27`](https://github.com/apache/spark/commit/fbcfb274bbf00a27a6147c39bda95a1a61708413).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-216477821
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57619/
    Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217318717
  
    @sun-rui Looks there is a conflict. Can you bring this up to date with master ?


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46792190
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    it is common to have . in method names in R, like is.numeric(), as.numeric()


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-217328732
  
    **[Test build #57945 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57945/consoleFull)** for PR 10094 at commit [`c6424d2`](https://github.com/apache/spark/commit/c6424d2c3c064de5e4fa368bf567a6e4352d443e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217328786
  
    Merged build finished. Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r61990485
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    +1 on "window.*" lower cased - I think it is consistent with other things we are adding "spark.lapply" "read.ml" etc.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46469691
  
    --- Diff: R/pkg/R/WindowSpec.R ---
    @@ -0,0 +1,178 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# WindowSpec.R - WindowSpec class and methods implemented in S4 OO classes
    +
    +#' @include generics.R jobj.R column.R
    +
    +#' @title S4 class that represents a WindowSpec
    +#' @description WindowSpec can be created by using Window.partitionBy()
    +#'              or Window.orderBy()
    +#' @rdname WindowSpec
    +#' @seealso window
    --- End diff --
    
    seealso needs to have a link:
    `@seealso \link{window}`


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-162498306
  
    **[Test build #47265 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47265/consoleFull)** for PR 10094 at commit [`3a57b99`](https://github.com/apache/spark/commit/3a57b999020582ff4d10d11df6e7c7b485db79be).


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217328788
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57945/
    Test PASSed.


---
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: [SPARK-11395][SPARKR][WIP] Support over and wi...

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

    https://github.com/apache/spark/pull/10094#issuecomment-161287053
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47064/
    Test FAILed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46909388
  
    --- Diff: R/pkg/R/WindowSpec.R ---
    @@ -0,0 +1,178 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# WindowSpec.R - WindowSpec class and methods implemented in S4 OO classes
    +
    +#' @include generics.R jobj.R column.R
    +
    +#' @title S4 class that represents a WindowSpec
    +#' @description WindowSpec can be created by using Window.partitionBy()
    +#'              or Window.orderBy()
    +#' @rdname WindowSpec
    +#' @seealso window
    +#'
    +#' @param sws A Java object reference to the backing Scala WindowSpec
    +#' @export
    +setClass("WindowSpec",
    +         slots = list(sws = "jobj"))
    +
    +setMethod("initialize", "WindowSpec", function(.Object, sws) {
    +  .Object@sws <- sws
    +  .Object
    +})
    +
    +windowSpec <- function(sws) {
    +  stopifnot(class(sws) == "jobj")
    +  new("WindowSpec", sws)
    +}
    +
    +#' @rdname show
    +setMethod("show", "WindowSpec",
    +          function(object) {
    +            cat("WindowSpec", callJMethod(object@sws, "toString"), "\n")
    +          })
    +
    +#' partitionBy
    +#'
    +#' Defines the partitioning columns in a WindowSpec.
    +#'
    +#' @param x a WindowSpec
    --- End diff --
    
    OK. Thanks. I will add it


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-215609110
  
    I think someone also add a `window` function?
    https://github.com/apache/spark/blob/a55fbe2a16aa0866ff8aca25bf9f772e6eb516a1/R/pkg/R/functions.R#L2154


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217087907
  
    Merged build finished. Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-217155259
  
    **[Test build #57883 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57883/consoleFull)** for PR 10094 at commit [`5d05d3d`](https://github.com/apache/spark/commit/5d05d3db608721d411be17aecd30daab3ca55722).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46878238
  
    --- Diff: R/pkg/R/WindowSpec.R ---
    @@ -0,0 +1,178 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# WindowSpec.R - WindowSpec class and methods implemented in S4 OO classes
    +
    +#' @include generics.R jobj.R column.R
    +
    +#' @title S4 class that represents a WindowSpec
    +#' @description WindowSpec can be created by using Window.partitionBy()
    +#'              or Window.orderBy()
    +#' @rdname WindowSpec
    +#' @seealso window
    +#'
    +#' @param sws A Java object reference to the backing Scala WindowSpec
    +#' @export
    +setClass("WindowSpec",
    +         slots = list(sws = "jobj"))
    +
    +setMethod("initialize", "WindowSpec", function(.Object, sws) {
    +  .Object@sws <- sws
    +  .Object
    +})
    +
    +windowSpec <- function(sws) {
    +  stopifnot(class(sws) == "jobj")
    +  new("WindowSpec", sws)
    +}
    +
    +#' @rdname show
    +setMethod("show", "WindowSpec",
    +          function(object) {
    +            cat("WindowSpec", callJMethod(object@sws, "toString"), "\n")
    +          })
    +
    +#' partitionBy
    +#'
    +#' Defines the partitioning columns in a WindowSpec.
    +#'
    +#' @param x a WindowSpec
    --- End diff --
    
    roxygen2 requires it - if missing it would try to infer it. I think it is better to be explicit and also it would be consistent everywhere we have it.
    But yes, it's optional: https://github.com/klutometis/roxygen/blob/3af98f2ca64cbbf2f2735ab4ef590b3fc39042ad/R/roclet-rd.R#L90


---
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: [SPARK-11395][SPARKR][WIP] Support over and wi...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-161287049
  
    **[Test build #47064 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47064/consoleFull)** for PR 10094 at commit [`eeed528`](https://github.com/apache/spark/commit/eeed52843fe959a526337187830fc6f91931a81a).
     * This patch **fails R style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217328822
  
    Thanks. Merging this to master and branch-2.0


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-216474834
  
    **[Test build #57619 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57619/consoleFull)** for PR 10094 at commit [`fbcfb27`](https://github.com/apache/spark/commit/fbcfb274bbf00a27a6147c39bda95a1a61708413).


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r62125165
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,92 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @name Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    +          signature(col = "character"),
    +          function(col, ...) {
    +            windowSpec(
    +              callJStatic("org.apache.spark.sql.expressions.Window",
    +                          "partitionBy",
    +                          col,
    +                          list(...)))
    +          })
    +
    +#' @rdname Window.partitionBy
    +#' @name Window.partitionBy
    +#' @export
    +setMethod("Window.partitionBy",
    --- End diff --
    
    Should we define these as S3 functions  ? I think we have so far used S4 functions for methods within a class - here I don't think we have a class per-se ?


---
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: [SPARK-11395][SPARKR][WIP] Support over and wi...

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

    https://github.com/apache/spark/pull/10094#issuecomment-161213493
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47046/
    Test FAILed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-162498765
  
    **[Test build #47265 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47265/consoleFull)** for PR 10094 at commit [`3a57b99`](https://github.com/apache/spark/commit/3a57b999020582ff4d10d11df6e7c7b485db79be).
     * This patch **fails R style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-217151676
  
    **[Test build #57883 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57883/consoleFull)** for PR 10094 at commit [`5d05d3d`](https://github.com/apache/spark/commit/5d05d3db608721d411be17aecd30daab3ca55722).


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-217325681
  
    **[Test build #57945 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57945/consoleFull)** for PR 10094 at commit [`c6424d2`](https://github.com/apache/spark/commit/c6424d2c3c064de5e4fa368bf567a6e4352d443e).


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r61993129
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    yeah I think lower case `window.*` is better as its similar to `read.df` and `spark.lapply` etc.
    @sun-rui Do you know if dplyr or some other R package supports windowing similar to 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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217087908
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57852/
    Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-217085793
  
    **[Test build #57852 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57852/consoleFull)** for PR 10094 at commit [`65d8377`](https://github.com/apache/spark/commit/65d83779d1c5445637a346be0c3313e92fb4ec8a).


---
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: [SPARK-11395][SPARKR][WIP] Support over and wi...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-161213488
  
    **[Test build #47046 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47046/consoleFull)** for PR 10094 at commit [`927fa99`](https://github.com/apache/spark/commit/927fa99e40de5735c842a28bddf2dc7370ad8b71).
     * This patch **fails R style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46878049
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    right i was thinking it might be easier to users not having to remember which partitionBy() to use if we could infer it by context and not having to name them differently


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r62124923
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    Yeah lets go with "window.*" - Thanks for the pointer to the Scala files.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r62275298
  
    --- Diff: R/pkg/inst/tests/testthat/test_sparkSQL.R ---
    @@ -2083,6 +2083,42 @@ test_that("dapply() on a DataFrame", {
       expect_identical(expected, result)
     })
     
    +test_that("Window functions on a DataFrame", {
    +  ssc <- callJMethod(sc, "sc")
    +  hiveCtx <- tryCatch({
    +    newJObject("org.apache.spark.sql.hive.test.TestHiveContext", ssc)
    +  },
    +  error = function(err) {
    +    skip("Hive is not build with SparkSQL, skipped")
    +  })
    +
    --- End diff --
    
    I modified SPARK-15159 to cover not only test cases but in API.


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-162509393
  
    **[Test build #47266 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47266/consoleFull)** for PR 10094 at commit [`edd8900`](https://github.com/apache/spark/commit/edd890031811e1dde2e63728abdd6be277cb039c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-161328068
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47067/
    Test FAILed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-162781379
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47303/
    Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r62146426
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,92 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @name Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    +          signature(col = "character"),
    +          function(col, ...) {
    +            windowSpec(
    +              callJStatic("org.apache.spark.sql.expressions.Window",
    +                          "partitionBy",
    +                          col,
    +                          list(...)))
    +          })
    +
    +#' @rdname Window.partitionBy
    +#' @name Window.partitionBy
    +#' @export
    +setMethod("Window.partitionBy",
    --- End diff --
    
    We already have S4 functions for those in org.apache.spark.sql.functions in Scala which don't have a class. I could implement these 2 as S3 or normal functions. But I think implementing them as S4 functions are consistent and having the benefit of checking parameter types.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-161328065
  
    Merged build finished. Test FAILed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46469799
  
    --- Diff: R/pkg/R/WindowSpec.R ---
    @@ -0,0 +1,178 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# WindowSpec.R - WindowSpec class and methods implemented in S4 OO classes
    +
    +#' @include generics.R jobj.R column.R
    +
    +#' @title S4 class that represents a WindowSpec
    +#' @description WindowSpec can be created by using Window.partitionBy()
    +#'              or Window.orderBy()
    +#' @rdname WindowSpec
    +#' @seealso window
    +#'
    +#' @param sws A Java object reference to the backing Scala WindowSpec
    +#' @export
    +setClass("WindowSpec",
    +         slots = list(sws = "jobj"))
    +
    +setMethod("initialize", "WindowSpec", function(.Object, sws) {
    +  .Object@sws <- sws
    +  .Object
    +})
    +
    +windowSpec <- function(sws) {
    +  stopifnot(class(sws) == "jobj")
    +  new("WindowSpec", sws)
    +}
    +
    +#' @rdname show
    +setMethod("show", "WindowSpec",
    +          function(object) {
    +            cat("WindowSpec", callJMethod(object@sws, "toString"), "\n")
    +          })
    +
    +#' partitionBy
    +#'
    +#' Defines the partitioning columns in a WindowSpec.
    +#'
    +#' @param x a WindowSpec
    --- End diff --
    
    please add
    `@name`, `@family` for method in this file


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-162504776
  
    **[Test build #47266 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47266/consoleFull)** for PR 10094 at commit [`edd8900`](https://github.com/apache/spark/commit/edd890031811e1dde2e63728abdd6be277cb039c).


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by sun-rui <gi...@git.apache.org>.
Github user sun-rui commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-216470626
  
    @felixcheung, the "window" function is not related to SQL Window functions and there is no name conflict with this 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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-162509484
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47266/
    Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-162747479
  
    **[Test build #47303 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47303/consoleFull)** for PR 10094 at commit [`ef08092`](https://github.com/apache/spark/commit/ef08092f3e49fe95cf13412a6bbf1d9404d4becf).


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-162781378
  
    Build finished. Test PASSed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-161328382
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47068/
    Test FAILed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r62185094
  
    --- Diff: R/pkg/inst/tests/testthat/test_sparkSQL.R ---
    @@ -2083,6 +2083,42 @@ test_that("dapply() on a DataFrame", {
       expect_identical(expected, result)
     })
     
    +test_that("Window functions on a DataFrame", {
    +  ssc <- callJMethod(sc, "sc")
    +  hiveCtx <- tryCatch({
    +    newJObject("org.apache.spark.sql.hive.test.TestHiveContext", ssc)
    +  },
    +  error = function(err) {
    +    skip("Hive is not build with SparkSQL, skipped")
    +  })
    +
    --- End diff --
    
    HiveContext is to be deprecated in 2.0.  Created SPARK-15159 for 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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r61913338
  
    --- Diff: R/pkg/R/window.R ---
    @@ -0,0 +1,88 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# window.R - Utility functions for defining window in DataFrames
    +
    +#' Window.partitionBy
    +#'
    +#' Creates a WindowSpec with the partitioning defined.
    +#'
    +#' @rdname Window.partitionBy
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#'   Window.partitionBy("col1", "col2")
    +#'   Window.partitionBy(df$col1, df$col2)
    +#' }
    +setMethod("Window.partitionBy",
    --- End diff --
    
    @sun-rui The scala example links don't seem to work anymore. Is there a new pointer to how this API looks in Python / Scala ?


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r46812551
  
    --- Diff: R/pkg/R/WindowSpec.R ---
    @@ -0,0 +1,178 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# WindowSpec.R - WindowSpec class and methods implemented in S4 OO classes
    +
    +#' @include generics.R jobj.R column.R
    +
    +#' @title S4 class that represents a WindowSpec
    +#' @description WindowSpec can be created by using Window.partitionBy()
    +#'              or Window.orderBy()
    +#' @rdname WindowSpec
    +#' @seealso window
    +#'
    +#' @param sws A Java object reference to the backing Scala WindowSpec
    +#' @export
    +setClass("WindowSpec",
    +         slots = list(sws = "jobj"))
    +
    +setMethod("initialize", "WindowSpec", function(.Object, sws) {
    +  .Object@sws <- sws
    +  .Object
    +})
    +
    +windowSpec <- function(sws) {
    +  stopifnot(class(sws) == "jobj")
    +  new("WindowSpec", sws)
    +}
    +
    +#' @rdname show
    +setMethod("show", "WindowSpec",
    +          function(object) {
    +            cat("WindowSpec", callJMethod(object@sws, "toString"), "\n")
    +          })
    +
    +#' partitionBy
    +#'
    +#' Defines the partitioning columns in a WindowSpec.
    +#'
    +#' @param x a WindowSpec
    --- End diff --
    
    could you tell the effect of @name? it seems that @rdname  is enough?


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-217237740
  
    LGTM


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#discussion_r62232371
  
    --- Diff: R/pkg/inst/tests/testthat/test_sparkSQL.R ---
    @@ -2083,6 +2083,42 @@ test_that("dapply() on a DataFrame", {
       expect_identical(expected, result)
     })
     
    +test_that("Window functions on a DataFrame", {
    +  ssc <- callJMethod(sc, "sc")
    +  hiveCtx <- tryCatch({
    +    newJObject("org.apache.spark.sql.hive.test.TestHiveContext", ssc)
    +  },
    +  error = function(err) {
    +    skip("Hive is not build with SparkSQL, skipped")
    +  })
    +
    --- End diff --
    
    I think we need another JIRA for changing hiveContext to sparkSession in SparkR API?


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by sun-rui <gi...@git.apache.org>.
Github user sun-rui commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-216474595
  
    @shivaram , @felixcheung , rebased to master. Let's continue the discussion on API naming.


---
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: [SPARK-11395][SPARKR][WIP] Support over and wi...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-161213189
  
    **[Test build #47046 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47046/consoleFull)** for PR 10094 at commit [`927fa99`](https://github.com/apache/spark/commit/927fa99e40de5735c842a28bddf2dc7370ad8b71).


---
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: [SPARK-11395][SPARKR][WIP] Support over and wi...

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

    https://github.com/apache/spark/pull/10094#issuecomment-161213491
  
    Merged build finished. Test FAILed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-216477820
  
    Merged build finished. Test PASSed.


---
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: [SPARK-11395][SPARKR][WIP] Support over and wi...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-161286708
  
    **[Test build #47064 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47064/consoleFull)** for PR 10094 at commit [`eeed528`](https://github.com/apache/spark/commit/eeed52843fe959a526337187830fc6f91931a81a).


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by sun-rui <gi...@git.apache.org>.
Github user sun-rui commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-217324955
  
    @shivaram, rebased to master


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-161328381
  
    Merged build finished. Test FAILed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-162498786
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47265/
    Test FAILed.


---
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: [SPARK-11395][SPARKR] Support over and window ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10094#issuecomment-217087857
  
    **[Test build #57852 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57852/consoleFull)** for PR 10094 at commit [`65d8377`](https://github.com/apache/spark/commit/65d83779d1c5445637a346be0c3313e92fb4ec8a).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11395][SPARKR] Support over and window ...

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

    https://github.com/apache/spark/pull/10094#issuecomment-162498781
  
    Merged build finished. Test FAILed.


---
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