cloud-fan commented on a change in pull request #23304: [SPARK-26353][SQL]Add
typed aggregate functions: max&&min
URL: https://github.com/apache/spark/pull/23304#discussion_r247113723
##########
File path:
sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetAggregatorSuiteBase.java
##########
@@ -61,5 +61,14 @@ public void tearDown() {
return ds.groupByKey((MapFunction<Tuple2<String, Integer>, String>) value
-> value._1(),
Encoders.STRING());
}
+
+ protected KeyValueGroupedDataset<String, Tuple2<String, Integer>>
generateEmptyGroupedDataset() {
+ Encoder<Tuple2<String, Integer>> encoder =
Encoders.tuple(Encoders.STRING(), Encoders.INT());
+ List<Tuple2<String, Integer>> data = Arrays.asList();
+ Dataset<Tuple2<String, Integer>> ds = spark.createDataset(data, encoder);
+
+ return ds.groupByKey((MapFunction<Tuple2<String, Integer>, String>) value
-> value._1(),
Review comment:
this is not global aggregate, can we follow
https://github.com/apache/spark/pull/23304/files#diff-bf07c7708b6eceda37d9c5c8b5be0d54R340
?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]