Skip to content

Commit

Permalink
fix second parameter of first_value/second_value is not constant lead…
Browse files Browse the repository at this point in the history
…ing to be core
  • Loading branch information
feiniaofeiafei committed Dec 9, 2024
1 parent eb4e1ba commit 954206b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 954206b

Please sign in to comment.