private static int vectorType(TajoDataTypes.Type type) { switch (type) { case BOOLEAN: return 0; case BIT: return 1; case INT1: case INT2: return 2; case INT4: case DATE: return 3; case INT8: case TIME: case TIMESTAMP: case INTERVAL: return 4; case FLOAT4: return 5; case FLOAT8: return 6; case TEXT: case CHAR: case BLOB: return 7; case NULL_TYPE: return -1; default: throw new TajoRuntimeException(new UnsupportedException("data type '" + type.name() + "'")); } }
public static Type createType( String baseTypeStr, List<Type> typeParams, List<Integer> valueParams, List<Field> fieldParams) { final TajoDataTypes.Type baseType; try { baseType = TajoDataTypes.Type.valueOf(baseTypeStr); } catch (Throwable t) { throw new TajoInternalError(new UnsupportedException(baseTypeStr)); } return TypeFactory.create(baseType, typeParams, valueParams, fieldParams); }