[vectorized](udf) java udf support map type (#22059)

This commit is contained in:
Mryange
2023-07-25 11:56:20 +08:00
committed by GitHub
parent 7891c99e9f
commit 0f439bb1ca
13 changed files with 560 additions and 9 deletions

View File

@ -63,6 +63,15 @@ public class MapType extends Type {
this.isValueContainsNull = true;
}
public MapType(Type keyType, Type valueType, boolean keyContainsNull, boolean valueContainsNull) {
Preconditions.checkNotNull(keyType);
Preconditions.checkNotNull(valueType);
this.keyType = keyType;
this.isKeyContainsNull = keyContainsNull;
this.valueType = valueType;
this.isValueContainsNull = valueContainsNull;
}
@Override
public PrimitiveType getPrimitiveType() {
return PrimitiveType.MAP;

View File

@ -38,6 +38,7 @@ import java.math.BigInteger;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -258,6 +259,7 @@ public abstract class Type {
.put(PrimitiveType.DECIMAL64, Sets.newHashSet(BigDecimal.class))
.put(PrimitiveType.DECIMAL128, Sets.newHashSet(BigDecimal.class))
.put(PrimitiveType.ARRAY, Sets.newHashSet(ArrayList.class))
.put(PrimitiveType.MAP, Sets.newHashSet(HashMap.class))
.build();
public static ArrayList<ScalarType> getIntegerTypes() {