Skip to content

Commit f5d4d1e

Browse files
committed
update
1 parent 69e6004 commit f5d4d1e

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

be/test/exec/runtime_filter/vruntimefilter_wrapper_sampling_test.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,16 @@ TEST_F(VRuntimeFilterWrapperSamplingTest, sampling_frequency_survives_context_re
154154
wrapper->open(_runtime_states[0].get(), context1.get(), FunctionContext::FRAGMENT_LOCAL)
155155
.ok());
156156

157-
// Simulate context recreation (what _append_rf_into_conjuncts does):
158-
// Create a brand new VExprContext with the same VRuntimeFilterWrapper.
159-
// The new context starts with default sampling_frequency = -1.
157+
// Create a brand new non-clone VExprContext with the same
158+
// VRuntimeFilterWrapper. The new context starts with default
159+
// sampling_frequency = -1.
160160
auto context2 = std::make_shared<VExprContext>(wrapper);
161161
EXPECT_FALSE(context2->get_runtime_filter_selectivity().maybe_always_true_can_ignore());
162162

163-
// After open() on the new context, sampling_frequency should be propagated
163+
// Open the recreated context with FRAGMENT_LOCAL to match the real
164+
// _append_rf_into_conjuncts path for a freshly created VExprContext.
164165
ASSERT_TRUE(
165-
wrapper->open(_runtime_states[0].get(), context2.get(), FunctionContext::THREAD_LOCAL)
166+
wrapper->open(_runtime_states[0].get(), context2.get(), FunctionContext::FRAGMENT_LOCAL)
166167
.ok());
167168
// Prepare/open the recreated context through VExprContext so the test matches
168169
// the production lifecycle and context-managed initialization.

0 commit comments

Comments
 (0)