yihua opened a new pull request, #1102:
URL: https://github.com/apache/hudi-rs/pull/1102

   ## Description
   
   part of #630
   
   Stacked on #1086; review that first. Until it merges, this PR also shows its 
commit.
   
   Two Variant read failures remain on top of #1086, both on tables Spark 
writes by default:
   
   - A table with two or more Variant columns, at the top level or nested, does 
not open. Hudi's writer defines the Variant record once in the empty namespace 
and refers to it by its bare name after that. Java Avro resolves that through a 
null-namespace fallback; `apache_avro` follows the spec and fails with `Unknown 
primitive type: hoodie.<table>.variant`. The reader now rewrites such a schema 
into one that resolves under the spec, for the table schema and for log-block 
writer schemas.
   - A shredded base file (Hudi 1.3 shreds top-level Variants by default on 
Spark 4.1+) failed to read. The reader now rebuilds the binary value with 
`unshred_variant` before projection, so shredded and unshredded files read the 
same in the core reader and in DataFusion.
   
   New fixtures come from Hudi 1.2.1 on Spark 4.0 (unshredded) and Hudi master 
on Spark 4.2 (every base file shredded), with a top-level Variant, one in a 
struct and an array of Variants; `generate.py` writes them.
   
   ## How are the changes test-covered
   
   - [ ] N/A
   - [x] Automated tests (unit and/or integration tests)
   - [x] Manual tests
     - [x] Details are described below
   
   Integration tests read the new fixtures in snapshot, time travel and a 
projection that drops the column defining the Variant record, and compare the 
DataFusion scan with the core reader on a shredded table; they fail without the 
change. Manually, reads matched Spark's on 8 table shapes (COW and MOR, bulk 
insert, nested Variants) in snapshot, time travel and incremental, for Hudi 
1.2.1 on Spark 4.0 and Hudi master on Spark 4.2 with shredding off, default and 
forced.
   


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

Reply via email to