[fix](function) Fix semantic analysis error in window function at first_value (#11855)
This commit is contained in:
@ -747,7 +747,9 @@ public class AnalyticExpr extends Expr {
|
||||
&& window != null
|
||||
&& window.getLeftBoundary().getType() != BoundaryType.UNBOUNDED_PRECEDING) {
|
||||
if (window.getLeftBoundary().getType() != BoundaryType.PRECEDING) {
|
||||
window = new AnalyticWindow(window.getType(), window.getLeftBoundary(),
|
||||
// Here left bound can only be CURRENT_ROW and the function is last_value,
|
||||
// so the type is changed to rows
|
||||
window = new AnalyticWindow(AnalyticWindow.Type.ROWS, window.getLeftBoundary(),
|
||||
window.getLeftBoundary());
|
||||
fnCall = new FunctionCallExpr(new FunctionName(LASTVALUE),
|
||||
getFnCall().getParams());
|
||||
|
||||
Reference in New Issue
Block a user