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
@@ -480,19 +479,19 @@ public static Map<PartitionField, Integer> getIdentityPartitions(PartitionSpec p
480
479
return columns .buildOrThrow ();
481
480
}
482
481
483
- public static List <Types . NestedField > primitiveFields (Schema schema )
482
+ public static List <NestedField > primitiveFields (Schema schema )
484
483
{
485
484
return primitiveFields (schema .columns ())
486
485
.collect (toImmutableList ());
487
486
}
488
487
489
- private static Stream <Types . NestedField > primitiveFields (List <NestedField > nestedFields )
488
+ private static Stream <NestedField > primitiveFields (List <NestedField > nestedFields )
490
489
{
491
490
return nestedFields .stream ()
492
491
.flatMap (IcebergUtil ::primitiveFields );
493
492
}
494
493
495
- private static Stream <Types . NestedField > primitiveFields (NestedField nestedField )
494
+ private static Stream <NestedField > primitiveFields (NestedField nestedField )
496
495
{
497
496
org .apache .iceberg .types .Type type = nestedField .type ();
498
497
if (type .isPrimitiveType ()) {
@@ -501,7 +500,7 @@ private static Stream<Types.NestedField> primitiveFields(NestedField nestedField
501
500
502
501
if (type .isNestedType ()) {
503
502
return primitiveFields (type .asNestedType ().fields ())
504
- .map (field -> Types . NestedField .from (field ).withName (nestedField .name () + "." + field .name ()).build ());
503
+ .map (field -> NestedField .from (field ).withName (nestedField .name () + "." + field .name ()).build ());
505
504
}
506
505
507
506
throw new IllegalStateException ("Unsupported field type: " + nestedField );
@@ -1252,11 +1251,11 @@ public static Optional<IcebergPartitionColumn> getPartitionColumnType(List<Parti
1252
1251
1253
1252
public static List <org .apache .iceberg .types .Type > partitionTypes (
1254
1253
List <PartitionField > partitionFields ,
1255
- Map <Integer , org . apache . iceberg . types . Type . PrimitiveType > idToPrimitiveTypeMapping )
1254
+ Map <Integer , PrimitiveType > idToPrimitiveTypeMapping )
1256
1255
{
1257
1256
ImmutableList .Builder <org .apache .iceberg .types .Type > partitionTypeBuilder = ImmutableList .builder ();
1258
1257
for (PartitionField partitionField : partitionFields ) {
1259
- org . apache . iceberg . types . Type . PrimitiveType sourceType = idToPrimitiveTypeMapping .get (partitionField .sourceId ());
1258
+ PrimitiveType sourceType = idToPrimitiveTypeMapping .get (partitionField .sourceId ());
1260
1259
org .apache .iceberg .types .Type type = partitionField .transform ().getResultType (sourceType );
1261
1260
partitionTypeBuilder .add (type );
1262
1261
}
0 commit comments