icexelloss commented on a change in pull request #22305:
[SPARK-24561][SQL][Python] User-defined window aggregation functions with
Pandas UDF (bounded window)
URL: https://github.com/apache/spark/pull/22305#discussion_r242302688
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/python/WindowInPandasExec.scala
##########
@@ -60,6 +108,26 @@ case class WindowInPandasExec(
override def outputPartitioning: Partitioning = child.outputPartitioning
+ /**
+ * Helper functions and data structures for window bounds
+ *
+ * It contains:
+ * (1) Total number of window bound indices in the python input row
+ * (2) Function from frame index to its lower bound column index in the
python input row
+ * (3) Function from frame index to its upper bound column index in the
python input row
+ * (4) Seq from frame index to its window bound type
+ */
+ private type WindowBoundHelpers = (Int, Int => Int, Int => Int,
Seq[WindowBoundType])
+
+ /**
+ * Enum for window bound types. Used only inside this class.
+ */
+ private sealed case class WindowBoundType(value: String)
+ private object UnboundedWindow extends WindowBoundType("unbounded")
+ private object BoundedWindow extends WindowBoundType("bounded")
+
+ private val WindowBoundTypeConf = "pandas_window_bound_types"
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]