twmb opened a new pull request, #2721:
URL: https://github.com/apache/iceberg-go/pull/2721

   Fixes for manifests with partition fields that iceberg-go could not write or 
read:
   
   * Every decimal fixed type was named "fixed", so two decimal partition 
fields of different precision or scale were conflicting definitions of one 
name, and two of the same precision and scale failed to rebuild the reference 
to the first; WriteManifest failed for both. A decimal fixed type is now named 
decimal_<precision>_<scale>, as Java names it.
   * When two partition fields share a fixed type, the schema defines the type 
at the first field and refers to it by name at the second, where Schema.Root() 
has no logical type. ReadManifest returned the second uuid as [16]byte and the 
second decimal as a *big.Rat, which also happens for manifests Java writes. 
getFieldIDMap now expands references first.
   * A partition field name such as "event.ts_day", which 
GeneratePartitionFieldName makes for day(event.ts), is not a valid Avro name, 
so every append to such a table failed with `invalid field name`. The partition 
record's Avro names are now made compatible as Java's 
AvroSchemaUtil.makeCompatibleName makes an ASCII name, and a non-ASCII letter 
is escaped too, because twmb/avro accepts only strict Avro names. Readers find 
partition fields by field ID, so the spec keeps its names.
   * Java allows non-ASCII letters and digits in an Avro name, so its manifests 
and Avro data files can have such names in their headers, and ReadManifest, the 
projected reader, partition statistics, snapshot validation of embedded v1 
manifests, and the Avro data file reader failed on them with `invalid field 
name`. These readers now accept such names. ReadManifestList stays strict, 
since the spec fixes every name in a manifest list header.
   * getFieldIDMap looked up data_file and its partition field without checking 
that each exists, and took the last branch of a partition union without 
checking that it has one, so a manifest reader panicked on a v1 manifest list 
or any other Avro file that is not a manifest. It now returns an error.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to