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_r245677186
 
 

 ##########
 File path: 
sql/core/src/test/java/test/org/apache/spark/sql/Java8DatasetAggregatorSuite.java
 ##########
 @@ -66,4 +66,40 @@ public void testTypedAggregationSumLong() {
         Arrays.asList(new Tuple2<>("a", 3L), new Tuple2<>("b", 3L)),
         agged.collectAsList());
   }
+
+  @Test
+  public void testTypedAggregationMinDouble() {
+    KeyValueGroupedDataset<String, Tuple2<String, Integer>> grouped = 
generateGroupedDataset();
+    Dataset<Tuple2<String, Double>> agged = grouped.agg(typed.min(v -> 
(double)v._2()));
+    Assert.assertEquals(
+            Arrays.asList(new Tuple2<>("a", 1.0), new Tuple2<>("b", 3.0)),
 
 Review comment:
   4 space indentation

----------------------------------------------------------------
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]

Reply via email to