beliefer commented on code in PR #44397:
URL: https://github.com/apache/spark/pull/44397#discussion_r1446073030
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/H2Dialect.scala:
##########
@@ -42,7 +42,7 @@ private[sql] object H2Dialect extends JdbcDialect {
private val distinctUnsupportedAggregateFunctions =
Set("COVAR_POP", "COVAR_SAMP", "CORR", "REGR_INTERCEPT", "REGR_R2",
"REGR_SLOPE", "REGR_SXY",
- "MODE")
+ "MODE", "PERCENTILE_CONT", "PERCENTILE_DISC")
Review Comment:
Because H2 dialect overrides the `visitInverseDistributionFunction` and
check with `isSupportedFunction`.
```
override def visitInverseDistributionFunction(
funcName: String,
isDistinct: Boolean,
inputs: Array[String],
orderingWithinGroups: Array[String]): String = {
if (isSupportedFunction(funcName)) {
super.visitInverseDistributionFunction(
dialectFunctionName(funcName), isDistinct, inputs,
orderingWithinGroups)
} else {
throw new UnsupportedOperationException(
s"${this.getClass.getSimpleName} does not support " +
s"inverse distribution function: $funcName")
}
}
```
--
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]