diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/WindowFunctionChecker.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/WindowFunctionChecker.java index c896c217e19c9a8..a602649ec31a6a9 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/WindowFunctionChecker.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/WindowFunctionChecker.java @@ -351,7 +351,7 @@ public FirstOrLastValue visitFirstValue(FirstValue firstValue, Void ctx) { @Override public FirstOrLastValue visitLastValue(LastValue lastValue, Void ctx) { if (2 == lastValue.arity() && !lastValue.child(1).isConstant()) { - throw new AnalysisException("The second parameter of lasst_value must be constant"); + throw new AnalysisException("The second parameter of last_value must be constant"); } return lastValue; } diff --git a/regression-test/suites/nereids_syntax_p0/window_function.groovy b/regression-test/suites/nereids_syntax_p0/window_function.groovy index 39f6cc3cfea84e9..a07a79b5e8ebbd8 100644 --- a/regression-test/suites/nereids_syntax_p0/window_function.groovy +++ b/regression-test/suites/nereids_syntax_p0/window_function.groovy @@ -288,6 +288,6 @@ suite("window_function") { test { sql "select last_value(c1,c1) over() from window_test" - exception "The second parameter of first_value must be constant" + exception "The second parameter of last_value must be constant" } }