[fix](array-type) Fix incorrect in function-set for array type (#11585)
There is some wrong logic in FunctionSet.java and it may causes potential risks for array functions invoke.
This commit is contained in:
@ -118,7 +118,7 @@ public class ArrayType extends Type {
|
||||
return false;
|
||||
}
|
||||
ArrayType otherArrayType = (ArrayType) other;
|
||||
return otherArrayType.itemType.equals(itemType);
|
||||
return otherArrayType.itemType.equals(itemType) && otherArrayType.containsNull == containsNull;
|
||||
}
|
||||
|
||||
public static boolean canCastTo(ArrayType type, ArrayType targetType) {
|
||||
|
||||
@ -1200,7 +1200,7 @@ public class FunctionSet<T> {
|
||||
if (!(descArgTypes[0] instanceof ScalarType)
|
||||
|| !(candicateArgTypes[0] instanceof ScalarType)) {
|
||||
if (candicateArgTypes[0] instanceof ArrayType) {
|
||||
return candicateArgTypes[0].matchesType(descArgTypes[0]);
|
||||
return descArgTypes[0].matchesType(candicateArgTypes[0]);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user