Skip to content

Commit

Permalink
fix fe ut
Browse files Browse the repository at this point in the history
  • Loading branch information
LiBinfeng-01 committed Sep 13, 2024
1 parent 1cb1888 commit 7f8c6d5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.doris.nereids.trees.expressions.functions.executable.StringArithmetic;
import org.apache.doris.nereids.trees.expressions.functions.executable.TimeRoundSeries;
import org.apache.doris.nereids.trees.expressions.literal.DateLiteral;
import org.apache.doris.nereids.trees.expressions.literal.DateTimeLiteral;
import org.apache.doris.nereids.trees.expressions.literal.Literal;
import org.apache.doris.nereids.trees.expressions.literal.NullLiteral;
import org.apache.doris.nereids.types.DataType;
Expand Down Expand Up @@ -128,6 +129,10 @@ private Expression invoke(Expression expression, String fnName, DataType[] args)
}

private boolean canDownCastTo(Class<?> expect, Class<?> input) {
if (DateLiteral.class.isAssignableFrom(expect)
|| DateTimeLiteral.class.isAssignableFrom(expect)) {
return expect.equals(input);
}
return expect.isAssignableFrom(input);
}

Expand Down

0 comments on commit 7f8c6d5

Please sign in to comment.