private UnknownType() { // We never access the native container for UNKNOWN because its null check is always true. // The actual native container type does not matter here. // We choose boolean to represent UNKNOWN because it's the smallest primitive type. super(new TypeSignature(NAME), boolean.class, 1); }
private UnknownType() { // We never access the native container for UNKNOWN because its null check is always true. // The actual native container type does not matter here. // We choose boolean to represent UNKNOWN because it's the smallest primitive type. super(new TypeSignature(NAME), boolean.class, 1); }
public BingTileType() { super(new TypeSignature(NAME)); }
public JoniRegexpType() { super(new TypeSignature(NAME), Regex.class); }
private RegressorType() { super(new TypeSignature(NAME)); } }
protected CodePointsType() { super(new TypeSignature(NAME), int[].class); }
public FunctionType(List<Type> argumentTypes, Type returnType) { this.signature = new TypeSignature(NAME, typeParameters(argumentTypes, returnType)); this.returnType = requireNonNull(returnType, "returnType is null"); this.argumentTypes = ImmutableList.copyOf(requireNonNull(argumentTypes, "argumentTypes is null")); }
public FunctionType(List<Type> argumentTypes, Type returnType) { this.signature = new TypeSignature(NAME, typeParameters(argumentTypes, returnType)); this.returnType = requireNonNull(returnType, "returnType is null"); this.argumentTypes = ImmutableList.copyOf(requireNonNull(argumentTypes, "argumentTypes is null")); }
@Override public Type getParameterizedType(String baseTypeName, List<TypeSignatureParameter> typeParameters) { return getType(new TypeSignature(baseTypeName, typeParameters)); }
private VarcharType(int length) { super( new TypeSignature( StandardTypes.VARCHAR, singletonList(TypeSignatureParameter.of((long) length))), Slice.class); if (length < 0) { throw new IllegalArgumentException("Invalid VARCHAR length " + length); } this.length = length; }
@JsonCreator public QuantileDigestType(Type type) { super(new TypeSignature(StandardTypes.QDIGEST, TypeSignatureParameter.of(type.getTypeSignature())), Slice.class); this.type = type; }
private static TypeSignature rowSignature(NamedTypeSignature... columns) { return new TypeSignature("row", transform(asList(columns), TypeSignatureParameter::of)); }
public static TypeSignature applyBoundVariables(TypeSignature typeSignature, BoundVariables boundVariables) { String baseType = typeSignature.getBase(); if (boundVariables.containsTypeVariable(baseType)) { checkState(typeSignature.getParameters().isEmpty(), "Type parameters cannot have parameters"); return boundVariables.getTypeVariable(baseType).getTypeSignature(); } List<TypeSignatureParameter> parameters = typeSignature.getParameters().stream() .map(typeSignatureParameter -> applyBoundVariables(typeSignatureParameter, boundVariables)) .collect(toList()); return new TypeSignature(baseType, parameters); }
@Override public Type getParameterizedType(String baseTypeName, List<TypeSignatureParameter> typeParameters) { return getType(new TypeSignature(baseTypeName, typeParameters)); }
private TypeSignature varchar(long length) { return new TypeSignature(StandardTypes.VARCHAR, TypeSignatureParameter.of(length)); }
@Override public Type getParameterizedType(String baseTypeName, List<TypeSignatureParameter> typeParameters) { return getType(new TypeSignature(baseTypeName, typeParameters)); }
private TypeSignature varchar(long length) { return new TypeSignature(StandardTypes.VARCHAR, TypeSignatureParameter.of(length)); }
private static Type generateType(Symbol symbol) { String typeName = Splitter.on('_').limit(2).splitToList(symbol.getName()).get(1); return METADATA.getType(new TypeSignature(typeName, ImmutableList.of())); } }
private TypeSignature decimal(String precisionVariable, String scaleVariable) { return new TypeSignature(StandardTypes.DECIMAL, ImmutableList.of( TypeSignatureParameter.of(precisionVariable), TypeSignatureParameter.of(scaleVariable))); }
private TypeSignature decimal(String precisionVariable, String scaleVariable) { return new TypeSignature(StandardTypes.DECIMAL, ImmutableList.of( TypeSignatureParameter.of(precisionVariable), TypeSignatureParameter.of(scaleVariable))); }