selectdb-robot opened a new pull request, #68324:
URL: https://github.com/apache/doris/pull/68324
### What problem does this PR solve?
Related PR: #67642
Backport #67642 to `branch-4.2`, cherry-picked from
`b0f266a8ebc1a333f806831f5d2209f837fda5d5`.
Fix string ZoneMap bounds at the 512-byte cutoff: carry when raising the
maximum, discard an all-zero overflowed range on read, and fall back to reading
rows for exact MIN/MAX when bounds were truncated. Preserve the original
statistics-collection override and the old SQL variable name as an alias.
### Branch compatibility adaptations
- `segment.cpp`: retain branch-4.2's `Schema` signature and column-ID
iteration; use `schema.column(schema.column_id(i))` for the new string-type
check. Add the original MIN/MAX forcing and fallback logic.
- `SessionVariable.java`: use branch-4.2's `VariableMgr.VarAttr` with
Chinese/English descriptions, preserving the new variable name, old alias,
default, and Thrift mapping.
- `PaloInternalService.thrift`: add only `force_pushdown_zonemap_minmax`
with the original field ID `1006` and default `false`. Do not import the
unrelated `1005` SNII option from master conflict context.
- `vgeneric_iterators_test.cpp`: although this file auto-merged, adapt the
added fixture to branch-4.2's `Schema`/`SchemaSPtr`, `SegmentWriterOptions`,
`TestSegmentWriter`, and `finalize()` APIs. All original test cases remain.
### Validation
- Verified all 12 original files are included; added/deleted lines in the
other 9 files match the original patch.
- No unresolved conflicts, conflict markers, or unstaged edits. Code
whitespace check passed. The generated `.out` retains the original final blank
separator, which default `git diff --check` reports as a blank line at EOF.
- Confirmed the target Schema/writer/annotation APIs and checked that
`TQueryOptions` field IDs are unique.
- Regression suite and expected output retain the original content; all
added BE test cases are retained.
- Compilation, BE unit tests, and runtime regression tests were not run in
this session; CI validation remains pending.
### Release note
Fix incorrect string ZoneMap pruning and MIN/MAX results for truncated
string bounds.
### Check List (For Author)
- Test
- [x] Regression tests included from #67642 (not run in this session)
- [x] Unit tests included from #67642 with branch API adaptations (not
run in this session)
- [ ] Manual test
- Behavior changed:
- [x] Yes. Apply the ZoneMap and MIN/MAX correctness fixes from #67642.
- Does this need documentation?
- [x] No additional documentation changes for this backport.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]