parseStringColumn(column); else if (isStructuralType(hiveTypes[column])) { parseObjectColumn(column);
return null; if (isStructuralType(type)) { Block block = (Block) fieldFromCursor; if (isArrayType(type)) {
return cursor.getLong(field); else if (isStructuralType(type)) { return cursor.getObject(field);
@Override public LazyBlockLoader structuralBlockLoader(RcFileColumnsBatch batch, int fieldId, HiveType hiveType, ObjectInspector fieldInspector, Type type) { checkArgument(isStructuralType(hiveType), "hiveType (" + hiveType + ") is not structuralType"); return new LazyStructuralBlockLoader(type, batch, fieldId, fieldInspector); }
@Override public LazyBlockLoader<LazyArrayBlock> structuralBlockLoader(RcFileColumnsBatch batch, int fieldId, HiveType hiveType, ObjectInspector fieldInspector, Type type) { checkArgument(isStructuralType(hiveType), "hiveType (" + hiveType + ") is not structuralType"); return new LazyStructuralBlockLoader(type, batch, fieldId, fieldInspector); }
@Override public Slice getSlice(int fieldId) { checkState(!closed, "Cursor is closed"); Type type = types[fieldId]; if (!type.equals(VARCHAR) && !type.equals(VARBINARY) && !isStructuralType(hiveTypes[fieldId])) { // we don't use Preconditions.checkArgument because it requires boxing fieldId, which affects inner loop performance throw new IllegalArgumentException(format("Expected field to be VARCHAR or VARBINARY, actual %s (field %s)", type, fieldId)); } if (!loaded[fieldId]) { parseStringColumn(fieldId); } return slices[fieldId]; }
@Override public Object getObject(int fieldId) { checkState(!closed, "Cursor is closed"); Type type = types[fieldId]; if (!isStructuralType(hiveTypes[fieldId])) { // we don't use Preconditions.checkArgument because it requires boxing fieldId, which affects inner loop performance throw new IllegalArgumentException(format("Expected field to be structural, actual %s (field %s)", type, fieldId)); } if (!loaded[fieldId]) { parseObjectColumn(fieldId); } return objects[fieldId]; }
private void parseColumn(int column) { Type type = types[column]; if (type.equals(BOOLEAN)) { parseBooleanColumn(column); } else if (type.equals(BIGINT)) { parseLongColumn(column); } else if (type.equals(DOUBLE)) { parseDoubleColumn(column); } else if (VARCHAR.equals(type) || VARBINARY.equals(type)) { parseStringColumn(column); } else if (isStructuralType(hiveTypes[column])) { parseObjectColumn(column); } else if (type.equals(DATE)) { parseLongColumn(column); } else if (type.equals(TIMESTAMP)) { parseLongColumn(column); } else { throw new UnsupportedOperationException("Unsupported column type: " + type); } }
private void parseColumn(int column) { Type type = types[column]; if (BOOLEAN.equals(type)) { parseBooleanColumn(column); } else if (BIGINT.equals(type)) { parseLongColumn(column); } else if (DOUBLE.equals(type)) { parseDoubleColumn(column); } else if (VARCHAR.equals(type) || VARBINARY.equals(type)) { parseStringColumn(column); } else if (isStructuralType(hiveTypes[column])) { parseObjectColumn(column); } else if (DATE.equals(type)) { parseLongColumn(column); } else if (TIMESTAMP.equals(type)) { parseLongColumn(column); } else { throw new UnsupportedOperationException("Unsupported column type: " + type); } }
private void parseColumn(int column) { Type type = types[column]; if (BOOLEAN.equals(type)) { parseBooleanColumn(column); } else if (BIGINT.equals(type)) { parseLongColumn(column); } else if (DOUBLE.equals(type)) { parseDoubleColumn(column); } else if (VARCHAR.equals(type) || VARBINARY.equals(type)) { parseStringColumn(column); } else if (isStructuralType(hiveTypes[column])) { parseObjectColumn(column); } else if (DATE.equals(type)) { parseLongColumn(column); } else if (TIMESTAMP.equals(type)) { parseLongColumn(column); } else { throw new UnsupportedOperationException("Unsupported column type: " + type); } }
fieldFromCursor = cursor.getLong(i); else if (isStructuralType(type)) { fieldFromCursor = cursor.getObject(i);
return null; if (isStructuralType(type)) { Block block = (Block) fieldFromCursor; if (isArrayType(type)) {
return cursor.getLong(field); else if (isStructuralType(type)) { return cursor.getObject(field);