[ https://issues.apache.org/jira/browse/DRILL-5099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943019#comment-15943019 ]
Nitin Pawar commented on DRILL-5099: ------------------------------------ [~khfaraaz] I am almost done with changes for this JIRA I am currently stuck at the point when copyNext has argument from next partition. Can any dev from MapR spare 15 minutes to help me resolve the issue. > support OFFSET values greater than one, for LEAD & LAG window functions > ----------------------------------------------------------------------- > > Key: DRILL-5099 > URL: https://issues.apache.org/jira/browse/DRILL-5099 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Flow > Affects Versions: 1.9.0 > Reporter: Khurram Faraaz > Priority: Minor > Labels: window_function > > Provide support for OFFSET values greater than one, for LEAD & LAG window > functions. > Adding [~adeneche] comments from the dev list here > {noformat} > Things that need to be done to make Lag (or Lead) support offsets other > than 1: > - WindowFunction.Lead should extract the offset value from its FunctionCall > argument, you can look at WindowFunctionNtile.numTilesFromExpression() for > and example on how to do that. > - make sure calls to copyNext() and copyPrev() in NoFrameSupportTemplate > use the offset and not the hard coded value (you already figured that out) > - finally make sure you update UnsupportedOperatorsVisitor to no longer > throw an exception when we pass an offset value other than 1 to Lead or > Lag. Just search for DRILL-3596 in that class and you will find the if > block that need to be removed > I think this should be enough to get it to work in the general case. > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)