Skip to content

Commit

Permalink
Revert "Fix count decimal Literal BE core (StarRocks#1249)" (StarRock…
Browse files Browse the repository at this point in the history
…s#1253)

This reverts commit 663e437.
  • Loading branch information
kangkaisen authored Nov 13, 2021
1 parent 60541fa commit d328bb8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class DecimalV3FunctionAnalyzer {

public static final Set<String> DECIMAL_AGG_FUNCTION_WIDER_TYPE =
new ImmutableSortedSet.Builder<>(String.CASE_INSENSITIVE_ORDER)
.add(FunctionSet.COUNT)
.add("sum").add("sum_distinct").add("multi_distinct_sum").add("avg").add("variance")
.add("variance_pop").add("var_pop").add("variance_samp").add("var_samp")
.add("stddev").add("stddev_pop").add("stddev_samp").build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4548,29 +4548,4 @@ public void testCaseWhen() throws Exception {
String plan = getFragmentPlan(sql);
Assert.assertTrue(plan.contains("PREDICATES: if(1: v1 IS NOT NULL, NULL, NULL)"));
}

@Test
public void testCountDecimalV3Literal() throws Exception {
Config.enable_decimal_v3 = true;
String sql = "select count( - - cast(89 AS DECIMAL )) from t0";
String plan = getFragmentPlan(sql);
Assert.assertTrue(plan.contains("output: count(89)"));

sql = "select max( - - cast(89 AS DECIMAL )) from t0";
plan = getFragmentPlan(sql);
Assert.assertTrue(plan.contains("output: max(89)"));

sql = "select min( - - cast(89 AS DECIMAL )) from t0";
plan = getFragmentPlan(sql);
Assert.assertTrue(plan.contains("output: min(89)"));

sql = "select sum( - - cast(89 AS DECIMAL )) from t0";
plan = getFragmentPlan(sql);
Assert.assertTrue(plan.contains("output: sum(89)"));

sql = "select avg( - - cast(89 AS DECIMAL )) from t0";
plan = getFragmentPlan(sql);
Assert.assertTrue(plan.contains("output: avg(89)"));
Config.enable_decimal_v3 = false;
}
}

0 comments on commit d328bb8

Please sign in to comment.