cloud-fan commented on a change in pull request #29800:
URL: https://github.com/apache/spark/pull/29800#discussion_r511914182



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowFunctionFrame.scala
##########
@@ -141,6 +141,24 @@ final class OffsetWindowFunctionFrame(
     inputIndex = offset
   }
 
+  override def currentLowerBound(): Int = throw new 
UnsupportedOperationException()
+
+  override def currentUpperBound(): Int = throw new 
UnsupportedOperationException()
+}
+
+/**
+ * The relative offset window frame calculates frames containing LEAD/LAG 
statements.
+ */
+class RelativeOffsetWindowFunctionFrame(
+    target: InternalRow,
+    ordinal: Int,
+    expressions: Array[OffsetWindowSpec],
+    inputSchema: Seq[Attribute],
+    newMutableProjection: (Seq[Expression], Seq[Attribute]) => 
MutableProjection,
+    offset: Int)
+  extends OffsetWindowFunctionFrameBase(
+    target, ordinal, expressions, inputSchema, newMutableProjection, offset) {
+

Review comment:
       can we move the default `prepare` implementation to this class? It's 
only used here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to