Hi Neeraj, I'm not a committer so I might be wrong, but there is no "blessed way" to include examples.
There are some examples in the official documentation at http://spark.apache.org/docs/latest/sql-programming-guide.html but this is how to use the general concepts not specific operators. There are some examples at http://spark.apache.org/examples.html I think the best way would be to include examples as close to the methods as possible and scaladoc/javadoc would be best IMHO. p.s. Just yesterday there was this thread "What open source projects have the best docs?" on twitter @ https://twitter.com/adamwathan/status/1257641015835611138. You could borrow some ideas of the docs that are claimed "the best". Pozdrawiam, Jacek Laskowski ---- https://about.me/JacekLaskowski "The Internals Of" Online Books <https://books.japila.pl/> Follow me on https://twitter.com/jaceklaskowski <https://twitter.com/jaceklaskowski> On Fri, May 8, 2020 at 11:34 AM neeraj bhadani <bhadani.neeraj...@gmail.com> wrote: > Hi Team, > I was looking for a Spark window function example on documentation. > > For example, I could the function definition and params are explained > nicely here: > https://spark.apache.org/docs/latest/api/python/pyspark.sql.html#pyspark.sql.Window.rowsBetween > > and this is the source which is available since spark version 2.1: > https://spark.apache.org/docs/latest/api/python/_modules/pyspark/sql/window.html#Window.rowsBetween > > But I couldn't find an example which helps to understand How it works. > > Although, while browsing the GitHub code I have found some example here: > https://github.com/apache/spark/blob/master/python/pyspark/sql/window.py#L83 > > which I couldn't find on the spark official doc page. Where and how this > example is linked with the official spark documentation. > > If such examples are not available, Could you please share the process on > how I can contribute examples to the spark documentation. > > Regards, > Neeraj >