/** * Search for a field by name in this Schema. * * @param name the name of the field to return * @return the corresponding field * @throws IllegalArgumentException if the field was not found */ public Field findField(String name) { return findField(getFields(), name); }
Converter groupConverterFromArrowSchema(String nameForChild, String fieldName, GroupType groupType, Collection<SchemaPath> c) { final Field arrowField = Schema.findField(arrowSchema, fieldName); final ArrowTypeID arrowTypeType = arrowField.getType().getTypeID(); final List<Field> arrowChildren = arrowField.getChildren(); if (arrowTypeType == ArrowTypeID.Union) { // if it's a union we will add the children directly to the parent return new UnionGroupConverter(mutator, getWriterProvider(), groupType, c, options, arrowChildren, nameForChild, schemaHelper); } else if (arrowTypeType == ArrowTypeID.List) { // make sure the parquet schema matches the arrow schema and delegate handling the logical list to defaultGroupConverter() Preconditions.checkState(groupType.getOriginalType() == OriginalType.LIST, "parquet schema doesn't match the arrow schema for LIST " + nameForChild); } return defaultGroupConverter(mutator, groupType, nameForChild, c, arrowChildren); }
se, context.getOptions(), arrowSchema == null ? null : arrowSchema.findField(fieldName), schemaHelper.readInt96AsTimeStamp() ); columnChunkMetaData = rowGroupMetadata.getColumns().get(columnChunkMetadataPositionsInList.get(Arrays.toString(column.getPath()))); schemaElement = schemaElements.get(column.getPath()[0]); Field childArrowField = arrowSchema == null ? null : arrowSchema.findField(schemaElement.getName()); if(childArrowField != null){ field = childArrowField;