private int getIndex(String key) { return getType().getFieldIndex(key); }
/** * @param fieldName * @return the type of this field by name */ public Type getType(String fieldName) { return getType(getFieldIndex(fieldName)); }
/** * @param fieldName * @return the type of this field by name */ public Type getType(String fieldName) { return getType(getFieldIndex(fieldName)); }
public Group getGroup(String field, int index) { return getGroup(getType().getFieldIndex(field), index); }
public GroupValueSource getGroup(String field, int index) { return getGroup(getType().getFieldIndex(field), index); }
public String getString(String field, int index) { return getString(getType().getFieldIndex(field), index); }
public void add(String field, int value) { add(getType().getFieldIndex(field), value); }
public int getFieldRepetitionCount(String field) { return getFieldRepetitionCount(getType().getFieldIndex(field)); }
public long getLong(String field, int index) { return getLong(getType().getFieldIndex(field), index); }
public boolean getBoolean(String field, int index) { return getBoolean(getType().getFieldIndex(field), index); }
public void add(String field, String value) { add(getType().getFieldIndex(field), value); }
public float getFloat(String field, int index) { return getFloat(getType().getFieldIndex(field), index); }
public String getString(String field, int index) { return getString(getType().getFieldIndex(field), index); }
public boolean getBoolean(String field, int index) { return getBoolean(getType().getFieldIndex(field), index); }
public void add(String field, String value) { add(getType().getFieldIndex(field), value); }
public void add(String field, Binary value) { add(getType().getFieldIndex(field), value); }
private Type getType(boolean columnIndexAccess, String alias, int index) { if(columnIndexAccess) { if(index < parquetSchema.getFieldCount()) { return parquetSchema.getType(index); } } else { return parquetSchema.getType(parquetSchema.getFieldIndex(alias)); } return null; }
public Group addGroup(String field) { if (DEBUG) logger.debug("add group "+field+" to "+getType().getName()); return addGroup(getType().getFieldIndex(field)); }
public Group addGroup(String field) { if (DEBUG) logger.debug("add group "+field+" to "+getType().getName()); return addGroup(getType().getFieldIndex(field)); }
private PrimitiveConverter getPrimitiveConverter(ColumnDescriptor path) { Type currentType = schema; Converter currentConverter = recordConverter; for (String fieldName : path.getPath()) { final GroupType groupType = currentType.asGroupType(); int fieldIndex = groupType.getFieldIndex(fieldName); currentType = groupType.getType(fieldName); currentConverter = currentConverter.asGroupConverter().getConverter(fieldIndex); } PrimitiveConverter converter = currentConverter.asPrimitiveConverter(); return converter; }