cloud-fan commented on code in PR #43910:
URL: https://github.com/apache/spark/pull/43910#discussion_r1413434642


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/percentiles.scala:
##########
@@ -374,6 +375,17 @@ case class PercentileCont(left: Expression, right: 
Expression, reverse: Boolean
     percentile.checkInputDataTypes()
   }
 
+  override def withOrderingWithinGroup(orderingWithinGroup: Seq[SortOrder]): 
AggregateFunction = {
+    if (orderingWithinGroup.length != 1) {
+      throw QueryCompilationErrors.wrongNumArgsError(
+        nodeName, Seq(2), orderingWithinGroup.length + 1)

Review Comment:
   Can we create a new sub-error-class under 
`INVALID_INVERSE_DISTRIBUTION_FUNCTION`? like `WRONG_NUM_ORDERINGS`.



-- 
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: reviews-unsubscr...@spark.apache.org

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