[fix](planner) fix preaggregation reason error (#7205)

this pr is going to Fix #7204.
This commit is contained in:
GoGoWen
2021-11-26 10:13:53 +08:00
committed by GitHub
parent a1bf2878c0
commit 52cd12a1f9

View File

@ -550,8 +550,8 @@ public class SingleNodePlanner {
continue;
}
if (col.isKey()) {
if (aggExpr.getFnName().getFunction().equalsIgnoreCase("MAX")
&& aggExpr.getFnName().getFunction().equalsIgnoreCase("MIN")) {
if ((!aggExpr.getFnName().getFunction().equalsIgnoreCase("MAX"))
&& (!aggExpr.getFnName().getFunction().equalsIgnoreCase("MIN"))) {
returnColumnValidate = false;
turnOffReason = "the type of agg on StorageEngine's Key column should only be MAX or MIN."
+ "agg expr: " + aggExpr.toSql();