shounakmk219 opened a new pull request, #18310:
URL: https://github.com/apache/pinot/pull/18310

   ## Summary
   
   - The previous fix (#18294) added a narrow guard inside the "column deleted" 
branch to suppress false positives when a timestamp index is removed. This was 
incomplete for two reasons raised in the PR review:
     - **Removing** a timestamp index should mark the segment stale so 
`SegmentPreProcessor` can clean up the orphaned `$col$GRANULARITY` columns — 
the old guard silently skipped them.
     - Adding a new granularity or configuring a timestamp index for the first 
time was misreported as `"column added"` rather than a dedicated timestamp 
index reason. Existing derived columns in the segment could also trigger 
spurious `"range index changed"` verdicts on every reload.
   - Replaces the guard with a **dedicated feature-level check** (following the 
StarTree and MultiColumnText pattern): before the per-column loop, compare the 
set of `$col$GRANULARITY` columns expected by the current table config against 
those present in the segment. Any mismatch returns `"timestamp index changed"`.
   - The generic `"column added"` check now excludes `$col$GRANULARITY` columns 
(covered by the dedicated check), and the per-column loop skips them entirely 
to prevent false positives on `"column deleted"` and `"range index changed"`.
   
   ## Test plan
   
   - [ ] Updated 4 existing timestamp index tests to assert `"timestamp index 
changed"` with `isStale() == true` for the 
add/remove/granularity-added/granularity-removed cases.
   - [ ] `testTimestampIndexNoChange` continues to assert not stale.
   - [ ] `./mvnw -pl pinot-core -am -Dtest=BaseTableDataManagerNeedRefreshTest 
-Dsurefire.failIfNoSpecifiedTests=false test` — all 42 tests pass.
   
   🤖 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]

Reply via email to