75
75
import org .apache .iceberg .io .LocationProvider ;
76
76
import org .apache .iceberg .types .Type .PrimitiveType ;
77
77
import org .apache .iceberg .types .TypeUtil ;
78
- import org .apache .iceberg .types .Types ;
79
78
import org .apache .iceberg .types .Types .NestedField ;
80
79
import org .apache .iceberg .types .Types .StructType ;
81
80
@@ -486,19 +485,19 @@ public static Map<PartitionField, Integer> getIdentityPartitions(PartitionSpec p
486
485
return columns .buildOrThrow ();
487
486
}
488
487
489
- public static List <Types . NestedField > primitiveFields (Schema schema )
488
+ public static List <NestedField > primitiveFields (Schema schema )
490
489
{
491
490
return primitiveFields (schema .columns ())
492
491
.collect (toImmutableList ());
493
492
}
494
493
495
- private static Stream <Types . NestedField > primitiveFields (List <NestedField > nestedFields )
494
+ private static Stream <NestedField > primitiveFields (List <NestedField > nestedFields )
496
495
{
497
496
return nestedFields .stream ()
498
497
.flatMap (IcebergUtil ::primitiveFields );
499
498
}
500
499
501
- private static Stream <Types . NestedField > primitiveFields (NestedField nestedField )
500
+ private static Stream <NestedField > primitiveFields (NestedField nestedField )
502
501
{
503
502
org .apache .iceberg .types .Type type = nestedField .type ();
504
503
if (type .isPrimitiveType ()) {
@@ -507,7 +506,7 @@ private static Stream<Types.NestedField> primitiveFields(NestedField nestedField
507
506
508
507
if (type .isNestedType ()) {
509
508
return primitiveFields (type .asNestedType ().fields ())
510
- .map (field -> Types . NestedField .from (field ).withName (nestedField .name () + "." + field .name ()).build ());
509
+ .map (field -> NestedField .from (field ).withName (nestedField .name () + "." + field .name ()).build ());
511
510
}
512
511
513
512
throw new IllegalStateException ("Unsupported field type: " + nestedField );
@@ -1284,11 +1283,11 @@ public static Optional<IcebergPartitionColumn> getPartitionColumnType(List<Parti
1284
1283
1285
1284
public static List <org .apache .iceberg .types .Type > partitionTypes (
1286
1285
List <PartitionField > partitionFields ,
1287
- Map <Integer , org . apache . iceberg . types . Type . PrimitiveType > idToPrimitiveTypeMapping )
1286
+ Map <Integer , PrimitiveType > idToPrimitiveTypeMapping )
1288
1287
{
1289
1288
ImmutableList .Builder <org .apache .iceberg .types .Type > partitionTypeBuilder = ImmutableList .builder ();
1290
1289
for (PartitionField partitionField : partitionFields ) {
1291
- org . apache . iceberg . types . Type . PrimitiveType sourceType = idToPrimitiveTypeMapping .get (partitionField .sourceId ());
1290
+ PrimitiveType sourceType = idToPrimitiveTypeMapping .get (partitionField .sourceId ());
1292
1291
org .apache .iceberg .types .Type type = partitionField .transform ().getResultType (sourceType );
1293
1292
partitionTypeBuilder .add (type );
1294
1293
}
0 commit comments