Skip to content

Commit 3da727f

Browse files
committed
[test](geo) drop redundant assert_cast on already-typed null_map column
### What problem does this PR solve? Issue Number: close #N/A Problem Summary: BE-UT has been failing master-wide since both PR #63491 (which strongly typed `ColumnNullable::get_null_map_column[_ptr]()` to `ColumnUInt8`) and PR #63049 (which added `functions_geo_test.cpp`) landed today. The new test calls ```cpp assert_cast<ColumnUInt8*>(nullable_input->get_null_map_column_ptr().get()) ->insert_value(0); ``` but the inner expression is already `ColumnUInt8*`, so the cast triggers the same-type static_assert added by PR #63133 to `src/core/assert_cast.h`: ``` static assertion failed due to requirement '!std::is_same_v<doris::ColumnVector<doris::TYPE_BOOLEAN> *, doris::ColumnVector<doris::TYPE_BOOLEAN> *>': assert_cast is redundant for the same type after removing cv/ref qualifiers ``` That kills `doris_be_test` compilation on every PR that runs BE-UT. Use the strongly typed `get_null_map_column()` (which returns `ColumnUInt8&`) directly so the cast is no longer needed. ### Release note None (test-only change, restores BE-UT compilation on master). ### Check List (For Author) - Test: - Compile-check on local ASAN tree: the affected translation unit now builds clean (`ninja test/CMakeFiles/doris_be_test.dir/exprs/function/geo/functions_geo_test.cpp.o`). - Behavior changed: No - Does this need documentation: No
1 parent 2b08baa commit 3da727f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

be/test/exprs/function/geo/functions_geo_test.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,10 @@ TEST(VGeoFunctionsTest, function_geo_st_geometries_invalid) {
372372
// Insert non-null but invalid data
373373
auto* nullable_input = assert_cast<ColumnNullable*>(input_col.get());
374374
nullable_input->get_nested_column_ptr()->insert_data(invalid_buf.data(), invalid_buf.size());
375-
assert_cast<ColumnUInt8*>(nullable_input->get_null_map_column_ptr().get())->insert_value(0);
375+
// After #63491, ColumnNullable::get_null_map_column() already returns
376+
// ColumnUInt8&, so the previous assert_cast<ColumnUInt8*>(...) is now
377+
// rejected by the same-type static_assert in src/core/assert_cast.h.
378+
nullable_input->get_null_map_column().insert_value(0);
376379
block.insert({std::move(input_col), input_type, "shape"});
377380

378381
FunctionBasePtr func = SimpleFunctionFactory::instance().get_function(

0 commit comments

Comments
 (0)