You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2021/06/20 07:15:04 UTC

[GitHub] [drill] Leon-WTF commented on a change in pull request #2259: DRILL-7931: Rowtype mismatch in DrillReduceAggregatesRule

Leon-WTF commented on a change in pull request #2259:
URL: https://github.com/apache/drill/pull/2259#discussion_r654889677



##########
File path: exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
##########
@@ -1239,4 +1239,17 @@ public void testInjectVariablesHashAgg() throws Exception {
       client.resetSession(PlannerSettings.STREAMAGG.getOptionName());
     }
   }
+
+  @Test //DRILL-7931
+  public void testRowTypeMissMatch() throws Exception {
+    testBuilder()
+      .sqlQuery("select col1, stddev(col2) as g1, SUM(col2) as g2 FROM " +
+        "(values ('UA', 3), ('USA', 2), ('UA', 3), ('USA', 5), ('USA', 1), " +
+        "('UA', 9)) t(col1, col2) GROUP BY col1 order by col1")
+      .ordered()
+      .baselineColumns("col1", "g1", "g2")
+      .baselineValues("UA", 3.4641016151377544, 15L)
+      .baselineValues("USA", 2.0816659994661326, 8L)

Review comment:
       Thanks Jason, by the way, do you know why approximateEquality is only enabled for unOrdered case, and tolerance is always set to 0 for ordered case?
   
   > There is a mechanism built into the test builder for this, you can call approximateEquality(tolerance) to avoid changing the SQL of the test to accomplish what you want.
   
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org