Window function

Does Druid support or have an alternative for sql window function eg LAG and LEAD?

My only Workaround is load bunch of rows into Pandas and use python functions

Hive reference

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics