File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
parquet/src/main/java/org/apache/iceberg/parquet Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -198,12 +198,13 @@ private static <T> T visitField(
198198 private static <T > List <T > visitFields (
199199 Types .StructType struct , GroupType group , TypeWithSchemaVisitor <T > visitor ) {
200200 List <T > results = Lists .newArrayListWithExpectedSize (group .getFieldCount ());
201- int i = 0 ;
201+ int fieldIdFromStruct = 0 ;
202202 for (Type field : group .getFields ()) {
203- int id = field .getId () != null
203+ int id =
204+ field .getId () != null
204205 ? field .getId ().intValue ()
205- : (struct != null ) ? struct .fields ().get (i ).fieldId () : -1 ;
206- i ++;
206+ : (struct != null ) ? struct .fields ().get (fieldIdFromStruct ).fieldId () : -1 ;
207+ fieldIdFromStruct ++;
207208 Types .NestedField iField = (struct != null && id >= 0 ) ? struct .field (id ) : null ;
208209 results .add (visitField (iField , field , visitor ));
209210 }
You can’t perform that action at this time.
0 commit comments