hello-stephen commented on code in PR #71341:
URL: https://github.com/apache/doris/pull/71341#discussion_r4781094337
##########
be/test/exprs/function/function_bitmap_test.cpp:
##########
@@ -226,9 +230,15 @@ TEST(function_bitmap_test, function_bitmap_to_base64) {
static_cast<void>(check_function<DataTypeString, true>(func_name,
input_types, data_set));
}
+
+ config::enable_set_in_bitmap_value = old_enable_set;
+ config::bitmap_serialize_version = old_serialize_version;
Review Comment:
[P3] Restore the configuration snapshot as well as the scalar flags.
`set_config()` also updates `full_conf_map` when it exists
(be/src/common/config.cpp:2652-2655). ConfigTest initializes that map, so after
either base64 test runs with the normal initial version 1, the new cleanup
restores the scalar to 1 while the snapshot still reports 2; bitmap keys absent
on entry are also left behind. `get_config_info()` reads the snapshot, not the
scalar. Since these tests exercise bitmap functions rather than the config API,
use direct assignments for setup as well (preferably with scope-exit
restoration), or preserve the original map entries including their absence.
Please apply this to both base64 tests.
##########
be/test/core/value/bitmap_value_test.cpp:
##########
@@ -1540,6 +1557,8 @@ TEST(BitmapValueTest, bitmap_single_convert) {
bitmap |= bitmap_u;
EXPECT_EQ(BitmapValue::BITMAP, bitmap._type);
+
+ config::enable_set_in_bitmap_value = old_enable_set;
Review Comment:
[P3] Preserve the Roaring-specific coverage after restoring the flag. The
checked-in default is true, so this restoration makes the five-element input in
`bitmap_value_iterator_test` (line 1581) a SET, not a Roaring BITMAP. Its input
is already sorted, so the sequence assertions still pass without exercising
Roaring traversal across the 32-/64-bit boundaries. The same change in ambient
state makes `copy` (line 1008) exercise an inline SET copy rather than Roaring
copy-on-write, and `sub_limit` (line 1519) exercise only the SET branch. Please
pin the representation in those tests themselves (or run both modes with scoped
restoration), rather than relying on previous tests to leave the flag false.
--
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]