[fix](Nereids) make the type of the first parameter in window_funnel is intergerLike (#15810)
This commit is contained in:
@ -74,7 +74,7 @@ public class WindowFunnel extends AggregateFunction
|
||||
@Override
|
||||
public void checkLegalityBeforeTypeCoercion() {
|
||||
String functionName = getName();
|
||||
if (!getArgumentType(0).isIntegerType()) {
|
||||
if (!getArgumentType(0).isIntegerLikeType()) {
|
||||
throw new AnalysisException("The window params of " + functionName + " function must be integer");
|
||||
}
|
||||
if (!getArgumentType(1).isStringLikeType()) {
|
||||
|
||||
@ -29,6 +29,7 @@ import org.apache.doris.nereids.trees.expressions.literal.Literal;
|
||||
import org.apache.doris.nereids.trees.expressions.literal.SmallIntLiteral;
|
||||
import org.apache.doris.nereids.types.coercion.AbstractDataType;
|
||||
import org.apache.doris.nereids.types.coercion.CharacterType;
|
||||
import org.apache.doris.nereids.types.coercion.IntegralType;
|
||||
import org.apache.doris.nereids.types.coercion.NumericType;
|
||||
import org.apache.doris.nereids.types.coercion.PrimitiveType;
|
||||
|
||||
@ -433,6 +434,10 @@ public abstract class DataType implements AbstractDataType {
|
||||
return this instanceof BooleanType;
|
||||
}
|
||||
|
||||
public boolean isIntegerLikeType() {
|
||||
return this instanceof IntegralType;
|
||||
}
|
||||
|
||||
public boolean isTinyIntType() {
|
||||
return this instanceof TinyIntType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user