huaxingao commented on a change in pull request #35130:
URL: https://github.com/apache/spark/pull/35130#discussion_r784389060
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala
##########
@@ -874,4 +874,32 @@ class JDBCV2Suite extends QueryTest with
SharedSparkSession with ExplainSuiteHel
checkAnswer(df, Seq(Row(2)))
// scalastyle:on
}
+
+ test("scan with aggregate push-down: partial push-down SUM, AVG, COUNT") {
+ val df = spark.read
+ .option("partitionColumn", "dept")
+ .option("lowerBound", "0")
+ .option("upperBound", "2")
+ .option("numPartitions", "2")
+ .table("h2.test.employee")
+ .agg(sum($"SALARY").as("sum"), avg($"SALARY").as("avg"),
count($"SALARY").as("count"))
+ checkAggregateRemoved(df, false)
Review comment:
This only verifies the aggregates are not completely pushed down. We
still need to check if the partial push down works, right?
--
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]