huaxingao commented on a change in pull request #35166:
URL: https://github.com/apache/spark/pull/35166#discussion_r788481239
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala
##########
@@ -20,13 +20,26 @@ package org.apache.spark.sql.jdbc
import java.sql.Types
import java.util.Locale
+import org.apache.spark.sql.connector.expressions.aggregate.{AggregateFunc,
GeneralAggregateFunc}
import org.apache.spark.sql.types._
private object DB2Dialect extends JdbcDialect {
override def canHandle(url: String): Boolean =
url.toLowerCase(Locale.ROOT).startsWith("jdbc:db2")
+ override def compileAggregate(aggFunction: AggregateFunc): Option[String] = {
+ super.compileAggregate(aggFunction).orElse(
+ aggFunction match {
+ case f: GeneralAggregateFunc if f.name() == "VAR_POP" =>
Review comment:
I thought both `STDDEV_POP` and `STDDEV_SAMP` are supported in DB2
version 11.5. Docker image is 11.5.6.0a?
--
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]