This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 811de72f3fb [fix](be) Fix function_h3_test build after 
FunctionStateScope became enum class (#69297)
811de72f3fb is described below

commit 811de72f3fbf7fea03788b3744ce15ccd7dce0b5
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Mon Oct 19 19:22:39 2026 +0100

    [fix](be) Fix function_h3_test build after FunctionStateScope became enum 
class (#69297)
    
    ### What problem does this PR solve?
    
    Issue Number: None
    
    Related PR: #69018, #69174
    
    Problem Summary:
    
    **In short.** BE UT fails with `BE BUILD FAIL` for every PR against
    master: `be/test/exprs/function/function_h3_test.cpp`, added by #69018,
    no longer compiles since #69174 made
    `FunctionContext::FunctionStateScope` an `enum class`. This PR spells
    the 8 affected calls with the scoped enumerators, so the test compiles
    again. Nothing else changes.
    
    **Background.** #69174 (merged 2026-10-18) turned
    `FunctionContext::FunctionStateScope` into an `enum class` and rewrote
    every caller from `FunctionContext::FRAGMENT_LOCAL` to
    `FunctionContext::FunctionStateScope::FRAGMENT_LOCAL`, and the same for
    `THREAD_LOCAL`. #69018 (merged 2026-10-19) added an H3 function test
    written against the old, unscoped names. The two PRs were merged
    independently; together they leave a test on master that does not
    compile. The BE UT pipeline merges each PR into the latest master before
    it builds `doris_be_test`, so the break hits every PR, whatever it
    changes.
    
    **The problem, and what it cost.** Since #69261 fixed the other test
    break of the day (left by #68447), every BE UT build for a PR against
    master stops at this file, for example [build
    1073803](http://43.132.222.7:8111/viewLog.html?buildId=1073803) (#69257,
    merged into master `41a58afba2e`):
    
    ```
    FAILED: [code=1] 
test/CMakeFiles/doris_be_test.dir/exprs/function/function_h3_test.cpp.o
    ../test/exprs/function/function_h3_test.cpp:66:62: error: no member named 
'FRAGMENT_LOCAL' in 'doris::FunctionContext'
    ../test/exprs/function/function_h3_test.cpp:67:62: error: no member named 
'THREAD_LOCAL' in 'doris::FunctionContext'
    ...
    8 errors generated.
    ninja: build stopped: subcommand failed.
    ```
    
    No BE unit test runs for those PRs, so their BE UT result says nothing
    about the PR until this is fixed.
    
    **How this PR fixes it.** The 8 `open` / `close` calls in
    `function_h3_test.cpp` now use
    `FunctionContext::FunctionStateScope::FRAGMENT_LOCAL` / `THREAD_LOCAL`,
    as #69174 did for the other function tests. The test logic is unchanged.
    
    **Results.** `-fsyntax-only` with the flags of each file's own entry in
    `be/ut_build_ASAN/compile_commands.json` (clang 22, `-DBE_TEST`):
    
    | File | master `41a58afba2e` | this PR |
    |---|---|---|
    | `function_h3_test.cpp` | the 8 errors CI reports | compiles |
    | the 4 test files #69261 fixed (`data_type_serde_arrow_test.cpp`,
    `data_type_variant_v2_serde_jsonb_test.cpp`,
    `variant_v2_execution_test.cpp`, `vparquet_writer_test.cpp`) | compile |
    compile (not touched) |
    | `function_array_zip_test.cpp` (baseline, not touched) | compiles |
    compiles |
---
 be/test/exprs/function/function_h3_test.cpp | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/be/test/exprs/function/function_h3_test.cpp 
b/be/test/exprs/function/function_h3_test.cpp
index 3c3ed851df0..215d4a799f9 100644
--- a/be/test/exprs/function/function_h3_test.cpp
+++ b/be/test/exprs/function/function_h3_test.cpp
@@ -63,14 +63,18 @@ TEST(FunctionH3Test, OnlyNullLatLngToCell) {
         ASSERT_NE(function, nullptr);
         FunctionUtils utils(result_type, types, false);
         auto* context = utils.get_fn_ctx();
-        ASSERT_TRUE(function->open(context, 
FunctionContext::FRAGMENT_LOCAL).ok());
-        ASSERT_TRUE(function->open(context, 
FunctionContext::THREAD_LOCAL).ok());
+        ASSERT_TRUE(
+                function->open(context, 
FunctionContext::FunctionStateScope::FRAGMENT_LOCAL).ok());
+        ASSERT_TRUE(
+                function->open(context, 
FunctionContext::FunctionStateScope::THREAD_LOCAL).ok());
         block.insert({nullptr, result_type, "result"});
         ASSERT_TRUE(function->execute(context, block, {0, 1, 2}, 3, 
rows).ok());
         EXPECT_EQ(block.get_by_position(3).column->size(), rows);
         EXPECT_TRUE(block.get_by_position(3).column->only_null());
-        EXPECT_TRUE(function->close(context, 
FunctionContext::THREAD_LOCAL).ok());
-        EXPECT_TRUE(function->close(context, 
FunctionContext::FRAGMENT_LOCAL).ok());
+        EXPECT_TRUE(
+                function->close(context, 
FunctionContext::FunctionStateScope::THREAD_LOCAL).ok());
+        EXPECT_TRUE(
+                function->close(context, 
FunctionContext::FunctionStateScope::FRAGMENT_LOCAL).ok());
     }
 }
 
@@ -109,8 +113,8 @@ static void check_coordinates(bool boundary, bool constant, 
bool only_null, size
         constants[0] = 
std::make_shared<ColumnPtrWrapper>(block.get_by_position(0).column);
     }
     context->set_constant_cols(constants);
-    ASSERT_TRUE(function->open(context, FunctionContext::FRAGMENT_LOCAL).ok());
-    ASSERT_TRUE(function->open(context, FunctionContext::THREAD_LOCAL).ok());
+    ASSERT_TRUE(function->open(context, 
FunctionContext::FunctionStateScope::FRAGMENT_LOCAL).ok());
+    ASSERT_TRUE(function->open(context, 
FunctionContext::FunctionStateScope::THREAD_LOCAL).ok());
     block.insert({nullptr, output_type, "result"});
     ASSERT_TRUE(function->execute(context, block, {0}, 1, rows).ok());
     auto result = 
block.get_by_position(1).column->convert_to_full_column_if_const();
@@ -146,8 +150,8 @@ static void check_coordinates(bool boundary, bool constant, 
bool only_null, size
             }
         }
     }
-    EXPECT_TRUE(function->close(context, FunctionContext::THREAD_LOCAL).ok());
-    EXPECT_TRUE(function->close(context, 
FunctionContext::FRAGMENT_LOCAL).ok());
+    EXPECT_TRUE(function->close(context, 
FunctionContext::FunctionStateScope::THREAD_LOCAL).ok());
+    EXPECT_TRUE(function->close(context, 
FunctionContext::FunctionStateScope::FRAGMENT_LOCAL).ok());
 }
 // NOLINTEND(readability-function-cognitive-complexity)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to