This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
new 5b7752fc5a [fix](function) Fix semantic analysis error in window
function at first_value (#11855)
5b7752fc5a is described below
commit 5b7752fc5a46e5f4ccd53baf25283e799526166c
Author: yinzhijian <[email protected]>
AuthorDate: Fri Aug 19 09:13:29 2022 +0800
[fix](function) Fix semantic analysis error in window function at
first_value (#11855)
---
fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java
index 6c6d16807b..a8adc13940 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java
@@ -630,7 +630,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());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]