You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/04/17 09:34:29 UTC

(doris) branch branch-2.0 updated: [fix](regression_test) test_not_supported_agg_fn failed (#33767)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new f395365e0a5 [fix](regression_test) test_not_supported_agg_fn failed (#33767)
f395365e0a5 is described below

commit f395365e0a58cd40c99063bbab3759ff781d6dba
Author: Jerry Hu <mr...@gmail.com>
AuthorDate: Wed Apr 17 17:34:21 2024 +0800

    [fix](regression_test) test_not_supported_agg_fn failed (#33767)
---
 .../expressions/functions/window/FirstOrLastValue.java | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/window/FirstOrLastValue.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/window/FirstOrLastValue.java
index bb0a68eef6a..aeaeb3a9113 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/window/FirstOrLastValue.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/window/FirstOrLastValue.java
@@ -22,9 +22,9 @@ import org.apache.doris.nereids.trees.expressions.Expression;
 import org.apache.doris.nereids.trees.expressions.functions.AlwaysNullable;
 import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature;
 import org.apache.doris.nereids.types.BooleanType;
-import org.apache.doris.nereids.types.coercion.AnyDataType;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
 
 import java.util.List;
 
@@ -32,12 +32,18 @@ import java.util.List;
  * parent class for first_value() and last_value()
  */
 public abstract class FirstOrLastValue extends WindowFunction
-        implements AlwaysNullable, ExplicitlyCastableSignature {
+        implements AlwaysNullable, ExplicitlyCastableSignature, RequireTrivialTypes {
 
-    private static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
-            FunctionSignature.retArgType(0).args(AnyDataType.INSTANCE_WITHOUT_INDEX),
-            FunctionSignature.retArgType(0).args(AnyDataType.INSTANCE_WITHOUT_INDEX, BooleanType.INSTANCE)
-    );
+    static {
+        List<FunctionSignature> signatures = Lists.newArrayList();
+        trivialTypes.forEach(t -> {
+            signatures.add(FunctionSignature.ret(t).args(t));
+            signatures.add(FunctionSignature.ret(t).args(t, BooleanType.INSTANCE));
+        });
+        SIGNATURES = ImmutableList.copyOf(signatures);
+    }
+
+    private static final List<FunctionSignature> SIGNATURES;
 
     public FirstOrLastValue(String name, Expression child, Expression ignoreNullValue) {
         super(name, child, ignoreNullValue);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org