@@ -19,8 +19,8 @@ import (
1919
2020 "github.com/apache/iceberg-go"
2121 "github.com/google/uuid"
22- "github.com/hamba/avro/v2"
2322 "github.com/parquet-go/parquet-go/format"
23+ "github.com/twmb/avro/atype"
2424)
2525
2626// ParquetStats contains statistics extracted from a parquet file footer
@@ -298,25 +298,25 @@ func goValueToLiteral(val any, iceType iceberg.Type) (iceberg.Literal, error) {
298298 }
299299}
300300
301- // PartitionFieldMaps returns avro logical types and fixed sizes for partition fields.
301+ // PartitionFieldMaps returns logical type strings and fixed sizes for partition fields.
302302// These are needed for the DataFileBuilder to properly serialize partition data.
303- func PartitionFieldMaps (spec iceberg.PartitionSpec , schema * iceberg.Schema ) (map [int ]avro. LogicalType , map [int ]int ) {
304- logicalTypes := make (map [int ]avro. LogicalType )
303+ func PartitionFieldMaps (spec iceberg.PartitionSpec , schema * iceberg.Schema ) (map [int ]string , map [int ]int ) {
304+ logicalTypes := make (map [int ]string )
305305 fixedSizes := make (map [int ]int )
306306
307307 partType := spec .PartitionType (schema )
308308 for _ , field := range partType .FieldList {
309309 switch t := field .Type .(type ) {
310310 case iceberg.DateType :
311- logicalTypes [field .ID ] = avro .Date
311+ logicalTypes [field .ID ] = atype .Date
312312 case iceberg.TimeType :
313- logicalTypes [field .ID ] = avro .TimeMicros
313+ logicalTypes [field .ID ] = atype .TimeMicros
314314 case iceberg.TimestampType , iceberg.TimestampTzType :
315- logicalTypes [field .ID ] = avro .TimestampMicros
315+ logicalTypes [field .ID ] = atype .TimestampMicros
316316 case iceberg.UUIDType :
317- logicalTypes [field .ID ] = avro .UUID
317+ logicalTypes [field .ID ] = atype .UUID
318318 case iceberg.DecimalType :
319- logicalTypes [field .ID ] = avro .Decimal
319+ logicalTypes [field .ID ] = atype .Decimal
320320 fixedSizes [field .ID ] = t .Scale ()
321321 }
322322 }
0 commit comments