lokeshj1703 opened a new pull request, #20049:
URL: https://github.com/apache/hudi/pull/20049

   ### Describe the issue this Pull Request addresses
   
   closes #19838
   
   ### Summary and Changelog
   
   A record whose configured ordering field is null was accepted into the write 
with an unvalidated ordering value, and only failed later in the merger, 
outside the error table's catch, so one bad record killed the job instead of 
being quarantined. Record creation now rejects it, and a configured error table 
parks it as a `RECORD_CREATION` failure.
   
   The check unwraps a multi-field ordering value rather than testing the 
ordering value for null: a single field resolves to the field value, so a null 
field gives a null ordering value, but several fields resolve to a non-null 
`ArrayComparable` that holds the nulls. Deletes are covered too, since a delete 
with a null ordering value is not a commit-time-ordering delete (that requires 
the default value) and would reach the same comparison.
   
   This includes the regression test from #19839, rebased onto current master 
and enabled, so #19839 can be closed once this merges. Its merge-handle 
parameter is dropped because it no longer selects between two record-creation 
paths now that `requiresPayload` is gone from this method. Added coverage: a 
null in one of several ordering fields, a delete carrying a null ordering 
value, and the no-error-table case.
   
   ### Impact
   
   Behavior change for Hudi Streamer upserts on a table with an ordering field 
configured. With an error table, such records are now quarantined instead of 
written. Without one, the batch now fails with an actionable message instead of 
writing a record whose ordering value cannot be compared, which is what the 0.x 
line already does. The Spark record path is untouched and still coerces a null 
ordering value to the default.
   
   ### Risk Level
   
   low
   
   ### Documentation Update
   
   None.
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] Adequate tests were added if applicable
   


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