This is an automated email from the ASF dual-hosted git repository. morrysnow pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push: new 01a8abc1bb [Fix](planner) fix to_monday() in fold constant bug. (#21950) 01a8abc1bb is described below commit 01a8abc1bbf9a8a02775c64fc56038f7eb36b367 Author: mch_ucchi <41606806+sohardforan...@users.noreply.github.com> AuthorDate: Fri Jul 21 17:50:05 2023 +0800 [Fix](planner) fix to_monday() in fold constant bug. (#21950) two to_monday() function will be selected because the function whose args are date types accepts datev2 types. So the datev2 types will be replaced to the date types. We fix it by disable function that accepts date types accepts datev2 types. for example: select to_monday('2021-02-01') the function returns datetime type not datetimev2 type because the to_monday(date) is selected. because function to_monday(date) accepts datev2 type. After being disabled, to_monday(datev2) will be selected. --- .../src/main/java/org/apache/doris/analysis/ExpressionFunctions.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java index e7dae9617b..8a3fa649d3 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java @@ -144,9 +144,7 @@ public enum ExpressionFunctions { } boolean match = true; for (int i = 0; i < argTypes1.length; i++) { - if (!(argTypes1[i].isDate() && argTypes2[i].isDateV2()) - && !(argTypes1[i].isDatetime() && argTypes2[i].isDatetimeV2()) - && !(argTypes1[i].isDecimalV2() && argTypes2[i].isDecimalV3()) + if (!(argTypes1[i].isDecimalV2() && argTypes2[i].isDecimalV3()) && !(argTypes1[i].isDecimalV2() && argTypes2[i].isDecimalV2()) && !argTypes1[i].equals(argTypes2[i])) { match = false; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org