Skip to content

benchmark compile error #67414

@stdpain

Description

@stdpain

Steps to reproduce the behavior (Required)

benchmark compile error

[100%] Built target orc_column_reader_bench
In file included from /root/starrocks/be/src/common/cow.h:23,
                 from /root/starrocks/be/src/column/column.h:26,
                 from /root/starrocks/be/src/column/const_column.h:17,
                 from /root/starrocks/be/src/column/column_helper.h:22,
                 from /root/starrocks/be/src/bench/get_dict_codes_bench.cpp:20:
/root/starrocks/be/src/gutil/casts.h: In instantiation of ‘To down_cast(From*) [with To = starrocks::BinaryColumnBase<unsigned int>*; From = const starrocks::Column]’:
/root/starrocks/be/src/bench/get_dict_codes_bench.cpp:89:66:   required from here
   89 |         auto* dict_value_binary_column = down_cast<BinaryColumn*>(dict_nullable_column->data_column().get());
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/starrocks/be/src/gutil/casts.h:80:12: error: ‘static_cast’ from type ‘const starrocks::Column*’ to type ‘starrocks::BinaryColumnBase<unsigned int>*’ casts away qualifiers
   80 |     return static_cast<To>(f);
      |            ^~~~~~~~~~~~~~~~~~
make[2]: *** [src/bench/CMakeFiles/get_dict_codes_bench.dir/build.make:79: src/bench/CMakeFiles/get_dict_codes_bench.dir/get_dict_codes_bench.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2383: src/bench/CMakeFiles/get_dict_codes_bench.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

/root/starrocks/be/src/bench/hash_functions_bench.cpp: In member function ‘void starrocks::HourFromUnixtimeBench::bench_from_unixtime_extract_hour(benchmark::State&)’:
/root/starrocks/be/src/bench/hash_functions_bench.cpp:247:47: error: ‘class starrocks::Column’ has no member named ‘get_data’
  247 |                 dt_col->as_mutable_raw_ptr()->get_data()[i].to_timestamp(&year, &month, &day, &hour, &minute, &second,
      |                                               ^~~~~~~~
make[2]: *** [src/bench/CMakeFiles/hash_functions_bench.dir/build.make:79: src/bench/CMakeFiles/hash_functions_bench.dir/hash_functions_bench.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2563: src/bench/CMakeFiles/hash_functions_bench.dir/all] Error 2
/root/starrocks/be/src/bench/object_cache_bench.cpp: In member function ‘void starrocks::ObjectCacheBench::init_cache(starrocks::CacheType)’:
/root/starrocks/be/src/bench/object_cache_bench.cpp:123:38: error: cannot convert ‘starrocks::DiskCacheOptions’ to ‘const starrocks::MemCacheOptions&’
  123 |         Status st = _lru_cache->init(opt);
      |                                      ^~~
      |                                      |
      |                                      starrocks::DiskCacheOptions
In file included from /root/starrocks/be/src/bench/object_cache_bench.cpp:22:
/root/starrocks/be/src/cache/mem_cache/lrucache_engine.h:28:40: note:   initializing argument 1 of ‘starrocks::Status starrocks::LRUCacheEngine::init(const starrocks::MemCacheOptions&)’
   28 |     Status init(const MemCacheOptions& options);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/root/starrocks/be/src/bench/object_cache_bench.cpp:137:42: error: cannot convert ‘std::__shared_ptr<starrocks::StarCacheEngine, __gnu_cxx::_S_atomic>::element_type*’ {aka ‘starrocks::StarCacheEngine*’} to ‘starrocks::LocalMemCacheEngine*’
  137 |         _page_cache->init(_star_cache.get());
      |                           ~~~~~~~~~~~~~~~^~
      |                                          |
      |                                          std::__shared_ptr<starrocks::StarCacheEngine, __gnu_cxx::_S_atomic>::element_type* {aka starrocks::StarCacheEngine*}
In file included from /root/starrocks/be/src/bench/object_cache_bench.cpp:23:
/root/starrocks/be/src/cache/mem_cache/page_cache.h:71:36: note:   initializing argument 1 of ‘void starrocks::StoragePageCache::init(starrocks::LocalMemCacheEngine*)’
   71 |     void init(LocalMemCacheEngine* cache_engine) {
      |               ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
make[2]: *** [src/bench/CMakeFiles/object_cache_bench.dir/build.make:79: src/bench/CMakeFiles/object_cache_bench.dir/object_cache_bench.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2983: src/bench/CMakeFiles/object_cache_bench.dir/all] Error 2
In file included from /opt/gcc-toolset-14/include/c++/14.3.0/bits/stl_iterator.h:78,
                 from /opt/gcc-toolset-14/include/c++/14.3.0/bits/stl_algobase.h:67,
                 from /opt/gcc-toolset-14/include/c++/14.3.0/algorithm:60,
                 from /var/local/thirdparty/installed/include/benchmark/benchmark.h:179,
                 from /root/starrocks/be/src/bench/chunks_sorter_bench.cpp:15:
/opt/gcc-toolset-14/include/c++/14.3.0/bits/stl_construct.h: In instantiation of ‘constexpr void std::_Construct(_Tp*, _Args&& ...) [with _Tp = starrocks::Chunk; _Args = {vector<starrocks::Cow<starrocks::Column>::ImmutPtr<starrocks::Column>, allocator<starrocks::Cow<starrocks::Column>::ImmutPtr<starrocks::Column> > >&, phmap::flat_hash_map<int, long unsigned int, starrocks::StdHash<int>, phmap::EqualTo<int>, allocator<pair<const int, long unsigned int> > >&}]’:
/opt/gcc-toolset-14/include/c++/14.3.0/bits/alloc_traits.h:706:19:   required from ‘static constexpr void std::allocator_traits<std::allocator<void> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = starrocks::Chunk; _Args = {std::vector<starrocks::Cow<starrocks::Column>::ImmutPtr<starrocks::Column>, std::allocator<starrocks::Cow<starrocks::Column>::ImmutPtr<starrocks::Column> > >&, phmap::flat_hash_map<int, long unsigned int, starrocks::StdHash<int>, phmap::EqualTo<int>, std::allocator<std::pair<const int, long unsigned int> > >&}; allocator_type = std::allocator<void>]’
  706 |         { std::_Construct(__p, std::forward<_Args>(__args)...); }
      |           ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/gcc-toolset-14/include/c++/14.3.0/bits/shared_ptr_base.h:607:39:   required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::vector<starrocks::Cow<starrocks::Column>::ImmutPtr<starrocks::Column>, std::allocator<starrocks::Cow<starrocks::Column>::ImmutPtr<starrocks::Column> > >&, phmap::flat_hash_map<int, long unsigned int, starrocks::StdHash<int>, phmap::EqualTo<int>, std::allocator<std::pair<const int, long unsigned int> > >&}; _Tp = starrocks::Chunk; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
  607 |           allocator_traits<_Alloc>::construct(__a, _M_ptr(),
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
  608 |               std::forward<_Args>(__args)...); // might throw
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
/opt/gcc-toolset-14/include/c++/14.3.0/bits/shared_ptr_base.h:969:16:   required from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = starrocks::Chunk; _Alloc = std::allocator<void>; _Args = {std::vector<starrocks::Cow<starrocks::Column>::ImmutPtr<starrocks::Column>, std::allocator<starrocks::Cow<starrocks::Column>::ImmutPtr<starrocks::Column> > >&, phmap::flat_hash_map<int, long unsigned int, starrocks::StdHash<int>, phmap::EqualTo<int>, std::allocator<std::pair<const int, long unsigned int> > >&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
  969 |           auto __pi = ::new (__mem)
      |                       ^~~~~~~~~~~~~
  970 |             _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expected behavior (Required)

Real behavior (Required)

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions