eldenmoon opened a new pull request, #64572: URL: https://github.com/apache/doris/pull/64572
### What problem does this PR solve? Fixes DORIS-26466. Variant compaction stats/extended-info collection used direct `get_column_reader(uid)` calls. When a schema-patched rowset declares a newly-added nullable/default-NULL Variant column that is absent from an old segment footer, that direct lookup returns `NOT_FOUND` instead of following the default/null-column behavior used by normal scan iterators. This PR skips missing nullable/default-NULL Variant columns while preserving errors for missing non-nullable columns. ### Check List - [x] Added regression test - [x] Unit test - [x] Manual test ### Release note None ### Testing - `python3 build-support/run_clang_format.py --clang-format-executable /mnt/disk1/claude-max/ldb_toolchain16/bin/clang-format-16 -r --style file --inplace true --extensions c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx --exclude none be/src/exec/common/variant_util.cpp` - `git diff --check upstream/master...HEAD` - Red/green BE UT in `/mnt/disk1/claude-max/tmp/doris-doris-26466-regression`: with the fix reverted, `IndexStorageVariantLifecycleTest.PatchedSchemaAddDropVariantColumnCompactsNewRows` failed with `[NOT_FOUND]column not found in segment meta, col_uid=4`; with the fix restored, it passed. - SQL regression in `/mnt/disk1/claude-max/tmp/doris-doris-26466-regression`: `./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d variant_p0/schema_change -s test_variant_add_drop_nullable_compaction` passed and forced cumulative compaction over rowsets `[2-2]` and `[3-3]`. With the fix reverted, this SQL E2E path still passed because normal SQL schema change keeps the old rowset schema from declaring the newly-added column; the BE UT remains the canonical red repro for the patched-schema state. -- 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]
