deepthi912 opened a new pull request, #20261:
URL: https://github.com/apache/pinot/pull/20261
With partial upsert and null handling on, a FORCE_OVERWRITE column should
become NULL when an update has no value for it. Instead it stores the column's
default value (`"null"` for STRING, 0 for numbers).
**Example:** column `note` uses FORCE_OVERWRITE.
| Update | Expected | Before this fix |
|---|---|---|
| `{"id": 7, "note": "hello"}` | `hello` | `hello` |
| `{"id": 7}` | NULL | `"null"` |
**Cause:** for a missing value, ingestion puts the default in the row and
marks the column null. The FORCE_OVERWRITE branch passed the default on as if
it were a real value, so the null mark was dropped.
**Fix:** if the new value is null, return `null` from the merger. The
handler then keeps the null mark, as it already does for the other strategies.
**Test:** `PartialUpsertHandlerTest.testForceOverwrite` never ran the
merger, because `field4` was missing from the schema and the segment columns.
It now does, and it fails without the fix.
**Validation:** 142 upsert and merger tests in `pinot-segment-local` pass;
checkstyle, license and spotless are clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]