Skip to content

Commit

Permalink
fix regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
seawinde committed Nov 19, 2023
1 parent 1e184f0 commit dad4ae7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,8 @@ public static ScalarType getAssignmentCompatibleType(
if (t1.type == PrimitiveType.STRING || t2.type == PrimitiveType.STRING) {
return createStringType();
}
return createVarcharType(Math.max(t1.len, t2.len));
int length = Math.max(t1.len, t2.len);
return createVarcharType(length == 0 ? MAX_VARCHAR_LENGTH : length);
}

if (((t1.isDecimalV3() || t1.isDecimalV2()) && (t2.isDateV2() || t2.isDate()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@
import org.apache.doris.nereids.trees.plans.LimitPhase;
import org.apache.doris.nereids.trees.plans.Plan;
import org.apache.doris.nereids.trees.plans.algebra.Aggregate;
import org.apache.doris.nereids.trees.plans.algebra.OneRowRelation;
import org.apache.doris.nereids.trees.plans.algebra.SetOperation.Qualifier;
import org.apache.doris.nereids.trees.plans.commands.AlterMTMVCommand;
import org.apache.doris.nereids.trees.plans.commands.Command;
Expand Down Expand Up @@ -2419,9 +2418,6 @@ private LogicalPlan withSelectQuerySpecification(
}
return new LogicalHaving<>(ExpressionUtils.extractConjunctionToSet(
getExpression((havingClause.get().booleanExpression()))), project);
} else if (inputRelation instanceof OneRowRelation) {
// If OneRowRelation should not add project, because slot will be wrong when analyze
return withHaving(aggregate, havingClause);
} else {
LogicalPlan having = withHaving(aggregate, havingClause);
return withProjection(having, selectColumnCtx, aggClause, isDistinct);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
["1970-01-01"]

-- !select --
[NULL]
[null]

0 comments on commit dad4ae7

Please sign in to comment.