Source:
private void setupForScan() { if (filter != null && (filter instanceof Filters.IsNull || filter instanceof Filters.AlwaysFalse)) { return; } RowType rowType = (RowType) type; int numFields = rowType.getFields().size(); int[] fieldColumns = new int[numFields]; int[] channelColumns = new int[numFields]; fieldTypes = new Type[numFields]; streamReaders = new StreamReader[numFields]; HashMap<Integer, Filter> filters = new HashMap(); for (int i = 0; i < numFields; i++) { fieldColumns[i] = i; channelColumns[i] = i; Optional<String> fieldName = rowType.getFields().get(i).getName(); Type fieldType = rowType.getFields().get(i).getType(); if (!fieldName.isPresent()) { throw new IllegalArgumentException("Missing struct field name in type " + rowType); } fieldTypes[i] = fieldType; if (filter != null && filter instanceof Filters.StructFilter) { Filters.StructFilter structFilter = (Filters.StructFilter) filter; Filter fieldFilter = structFilter.getMember(new SubfieldPath.PathElement(fieldName.get(), 0)); if (fieldFilter != null) { filters.put(i, fieldFilter); } } String lowerCaseFieldName = fieldName.get().toLowerCase(Locale.ENGLISH); if (referencedFields != null && !referencedFields.contains(lowerCaseFieldName)) { fieldColumns[i] = -1; } if (fieldColumns[i] != -1 || filters.get(i) != null) { StreamReader streamReader = structFields.get(lowerCaseFieldName); streamReaders[i] = streamReader; } } fieldChannels = fieldColumns; if (!outputChannelSet) { Arrays.fill(fieldChannels, -1); for (int i = 0; i < numFields; i++) { if (filters.get(i) == null) { streamReaders[i] = null; } } } reader = new ColumnGroupReader(streamReaders, null, channelColumns, rowType.getTypeParameters(), fieldColumns, fieldColumns, filters, new FilterFunction[0], true, 0); }

Target:
private void setupForScan() { RowType rowType = (RowType) type; int numFields = rowType.getFields().size(); int[] fieldColumns = new int[numFields]; int[] channelColumns = new int[numFields]; fieldTypes = new Type[numFields]; streamReaders = new StreamReader[numFields]; HashMap<Integer, Filter> filters = new HashMap(); for (int i = 0; i < numFields; i++) { fieldColumns[i] = i; channelColumns[i] = i; Optional<String> fieldName = rowType.getFields().get(i).getName(); Type fieldType = rowType.getFields().get(i).getType(); if (!fieldName.isPresent()) { throw new IllegalArgumentException("Missing struct field name in type " + rowType); } fieldTypes[i] = fieldType; if (filter != null) { Filter fieldFilter = ((Filters.StructFilter) filter).getMember(new NestedField(fieldName.get())); if (fieldFilter != null) { filters.put(i, fieldFilter); } } String lowerCaseFieldName = fieldName.get().toLowerCase(Locale.ENGLISH); if (referencedFields != null && !referencedFields.contains(lowerCaseFieldName)) { fieldColumns[i] = -1; } if (fieldColumns[i] != -1 || filters.get(i) != null) { StreamReader streamReader = structFields.get(lowerCaseFieldName); streamReaders[i] = streamReader; } } fieldChannels = fieldColumns; if (!outputChannelSet) { Arrays.fill(fieldChannels, -1); for (int i = 0; i < numFields; i++) { if (filters.get(i) == null) { streamReaders[i] = null; } } } reader = new ColumnGroupReader(streamReaders, null, channelColumns, rowType.getTypeParameters(), fieldColumns, fieldColumns, filters, new FilterFunction[0], true, 0); }