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

   ## Rationale for the change
   
   Ports the type-uniformity rule from Java's 
[apache/iceberg#17424](https://github.com/apache/iceberg/pull/17424) into the 
Go shredding-inference analyzer.
   
   ## Changes
   
   `AnalyzeVariantShredding` used to shred a mixed-type field by majority vote, 
leaving a `typed_value` column that only covered the majority rows. Now a field 
shreds only when all its non-null values fall in one type family: 
`fieldInfo.admittedType`
   (renamed from `mostCommonType`) collapses the integer and decimal families 
to their widest member and returns "not shreddable" if more than one family 
remains. Integer and decimal widening still shred; cross-family mixes 
(int+string, int+decimal, float+double, timestamp micros+nanos) no longer do. 
The dead majority-vote tie-break is removed.
   
   Write-side inference only - read paths are unaffected.
   
   ## Are these changes tested?
   
   - New/updated analyzer cases cover mixed-type, cross-family, 
empty-container, widening, and nulls-plus-one-type; 
`TestShreddedVariantWriteMixedTypeField` proves end to end that a mixed field 
is not shredded and every row still round-trips.
   - Cross-engine Spark 3.5 and 4.0 integration suites pass locally


-- 
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