[vectorized](udf) java udf support map type (#22059)
This commit is contained in:
@ -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;
|
||||
|
||||
@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user