[refactor](type) AggStateType should not extends ScalarType (#34463)
1. let AggStateType extends Type 2. remove useless interface isFixedLengthType and supportsTablePartitioning 3. let MapType implement interface isSupported 4. let VariantType extends ScalarType
This commit is contained in:
@ -1922,11 +1922,11 @@ public abstract class Expr extends TreeNode<Expr> implements ParseNode, Cloneabl
|
||||
f.setNullableMode(NullableMode.ALWAYS_NOT_NULLABLE);
|
||||
} else {
|
||||
Function original = f;
|
||||
f = ((AggregateFunction) f).clone();
|
||||
f = f.clone();
|
||||
f.setArgs(argList);
|
||||
if (isUnion) {
|
||||
f.setName(new FunctionName(name + AGG_UNION_SUFFIX));
|
||||
f.setReturnType((ScalarType) argList.get(0));
|
||||
f.setReturnType(argList.get(0));
|
||||
f.setNullableMode(NullableMode.ALWAYS_NOT_NULLABLE);
|
||||
}
|
||||
if (isMerge) {
|
||||
|
||||
@ -78,7 +78,7 @@ public class AggStateType extends DataType {
|
||||
|
||||
@Override
|
||||
public Type toCatalogDataType() {
|
||||
List<Type> types = subTypes.stream().map(t -> t.toCatalogDataType()).collect(Collectors.toList());
|
||||
List<Type> types = subTypes.stream().map(DataType::toCatalogDataType).collect(Collectors.toList());
|
||||
return Expr.createAggStateType(functionName, types, subTypeNullables);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user