void visitArray(Array array) { visit(array.elementType()); } void visitRecord(Record record) {
static Type createPrimitiveType(TypeElement element) { assertPrimitiveType(element); if (isValueParameterized(element.getKind())) { return TypeFactory.create(element.getKind(), EMPTY_LIST, element.getValueParamsList(), EMPTY_LIST); } else if (element.getKind() == PROTOBUF) { // TODO - PROTOBUF type should be removed later return new Protobuf(element.getStringParams(0)); } else { return TypeFactory.create(element.getKind()); } }
public CharDatum(byte val) { super(Char(1)); this.size = 1; bytes = new byte[size]; bytes[0] = val; }
@Override public String getName() { return target.toString(); }
public ProtobufDatum(Message message) { super(new Protobuf(null)); this.value = message; }
@Override public TypeProto getProto() { return TypeProtobufEncoder.encode(this); } }
public static Numeric Numeric(int precision) { return new Numeric(precision, DEFAULT_SCALE); }
public static Map Map(Type keyType, Type valueType) { return new Map(keyType, valueType); }
public static Varchar Varchar(int len) { return new Varchar(len); }
public static Char Char(int len) { return new Char(len); }
public static int getWordSize(org.apache.tajo.type.Type type) { final TajoDataTypes.Type baseType = type.kind(); if (baseType == INT8 || baseType == FLOAT8 || baseType == TIMESTAMP || baseType == TIME) { return 2; } else { return 1; } }
public CharDatum(byte [] bytes) { super(Char(1)); this.bytes = bytes; this.size = bytes.length; }
public static boolean isJVMInternalInt(org.apache.tajo.type.Type type) { final TajoDataTypes.Type baseType = type.kind(); return baseType == BOOLEAN || baseType == INT1 || baseType == INT2 || baseType == INT4; }
public boolean isAny() { return this.kind() == TajoDataTypes.Type.ANY; }
public boolean isStruct() { return this.kind() == TajoDataTypes.Type.RECORD; }