beliefer commented on a change in pull request #35166:
URL: https://github.com/apache/spark/pull/35166#discussion_r788268740
##########
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 tests other function and throw error that tell me DB2 doesn't support
them.
According to the latest doc of DB2, it supports `STDDEV_POP` too.
It seems the docker image uses some lower version of DB2.
--
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]