cloud-fan commented on code in PR #48523:
URL: https://github.com/apache/spark/pull/48523#discussion_r1825276448
##########
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala:
##########
@@ -543,6 +545,20 @@ class SparkSessionExtensionSuite extends SparkFunSuite
with SQLHelper with Adapt
}
}
}
+
+ test("test custom aggregate hint") {
+ // The custom hint allows us to replace the aggregate (without grouping
keys) with just
+ // Literal.
+
withSession(Seq(_.injectHintResolutionRule(CustomerAggregateHintResolutionRule),
+ _.injectOptimizerRule(CustomAggregateRule))) { session =>
+ val res = ((session.range(10).agg(max("id")).as("max_id"))).
Review Comment:
```suggestion
val res = session.range(10).agg(max("id")).as("max_id").
```
--
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]