HyukjinKwon commented on code in PR #36063:
URL: https://github.com/apache/spark/pull/36063#discussion_r846942722
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -1014,3 +1014,54 @@ case class PercentRank(children: Seq[Expression])
extends RankLike with SizeBase
override protected def withNewChildrenInternal(newChildren:
IndexedSeq[Expression]): PercentRank =
copy(children = newChildren)
}
+
+/**
+ * The Exponentially Weighted Window, MUST only be used in the Pandas API on
Pyspark.
+ * An exponentially weighted window is similar to an expanding window but with
each prior point
+ * being exponentially weighted down relative to the current point.
+ * In general, a weighted moving average is calculated as
+ * y_t = \frac{\sum_{i=0}^t w_i x_{t-i}}{\sum_{i=0}^t w_i},
+ * where x_t is the input, y_t is the result and the w_i are the weights.
+ * See
https://pandas.pydata.org/docs/user_guide/window.html#exponentially-weighted-window
+ * for details.
+ * For now, only function mean is supported. Other functions like sum/var will
be added
+ * in the future.
+ */
+private[sql] case class EWM(input: Expression, alpha: Double)
Review Comment:
We can remove this per SPARK-16813
```suggestion
case class EWM(input: Expression, alpha: Double)
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]