Github user sun-rui commented on the pull request:

    https://github.com/apache/spark/pull/9193#issuecomment-151055969
  
    @shivaram, [R lag 
function](https://stat.ethz.ch/R-manual/R-devel/library/stats/html/lag.html) is 
for time series objects, which is irrelevant to the lead/lag here in SQL window 
functions.
    
    There are some functions in dplyr package mimicing SQL window functions, 
including lead and lag. Refer to 
https://cran.r-project.org/web/packages/dplyr/vignettes/window-functions.html 
and https://cran.r-project.org/web/packages/dplyr/dplyr.pdf. But a quick glance 
at these functions shows that they are working on vectors (for example, lag 
right shifts a vector by offset), so the semantic of them are different from 
those in Spark.
    
    So for now I won't change 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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to