[Chore](build) enable -Wpedantic and update lowest gcc version to 11.1 (#16290)

enable -Wpedantic and update lowest gcc version to 11.1
This commit is contained in:
Pxl
2023-02-03 11:28:48 +08:00
committed by GitHub
parent 7d5a10e1af
commit 5e4bb98900
121 changed files with 248 additions and 323 deletions

View File

@ -18,3 +18,8 @@
Diagnostics:
UnusedIncludes: Strict
If:
PathMatch: be/test/.*
CompileFlags:
CompilationDatabase: be/ut_build_ASAN/

View File

@ -60,7 +60,6 @@ endif ()
# Set boost/stacktrace use backtrace api to unwind
if (NOT OS_MACOSX)
add_definitions(-DBOOST_STACKTRACE_USE_BACKTRACE)
#add_definitions(-DPRINT_ALL_ERR_STATUS_STACKTRACE)
else()
add_definitions(-DBOOST_STACKTRACE_USE_NOOP)
endif()
@ -118,8 +117,8 @@ option(WITH_MYSQL "Support access MySQL" ON)
# Check gcc
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.0")
message(FATAL_ERROR "Need GCC version at least 11.0")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.1")
message(FATAL_ERROR "Need GCC version at least 11.1")
endif()
endif()
@ -490,27 +489,25 @@ if (NOT CUSTUM_LINKER_COMMAND STREQUAL "ld")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${CUSTUM_LINKER_COMMAND}")
endif()
if (USE_LIBCPP AND COMPILER_CLANG)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -stdlib=libc++")
if (NOT OS_MACOSX)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -lstdc++")
endif()
add_definitions(-DUSE_LIBCPP)
endif()
if (COMPILER_GCC)
# Avoid GCC 11 false alarm
# https://stackoverflow.com/questions/67584073/gcc-11-false-array-subscript-is-partly-outside-array-bounds-warning
# https://stackoverflow.com/questions/69426070/gcc-11-order-of-arguments-triggers-false-positive-wstringop-overflow-is-this-bu
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-array-bounds -Wno-stringop-overread")
add_compile_options(-Wno-stringop-overflow -fdiagnostics-color=always)
add_compile_options(-fdiagnostics-color=always -Wno-array-bounds -Wno-stringop-overread)
endif ()
if (COMPILER_CLANG)
add_compile_options(-fcolor-diagnostics -fno-limit-debug-info)
add_compile_options(-fcolor-diagnostics -fno-limit-debug-info -Wpedantic)
add_compile_options(-Wno-zero-length-array -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -Wno-vla-extension -Wno-c++20-designator -Wno-gnu-label-as-value -Wno-embedded-directive -Wno-array-bounds)
if(MAKE_TEST STREQUAL "OFF")
add_compile_options(-Qunused-arguments)
endif()
if (USE_LIBCPP)
add_compile_options(-stdlib=libc++)
if (NOT OS_MACOSX)
add_compile_options(-lstdc++)
endif()
add_definitions(-DUSE_LIBCPP)
else()
add_compile_options(-Wno-c++20-attribute-extensions)
endif()
endif ()
# https://github.com/boostorg/uuid/issues/92

View File

@ -29,7 +29,7 @@ namespace doris {
class MasterServerClient {
public:
MasterServerClient(const TMasterInfo& master_info, FrontendServiceClientCache* client_cache);
virtual ~MasterServerClient() {};
virtual ~MasterServerClient() = default;
// Report finished task to the master server
//
@ -59,8 +59,8 @@ private:
class AgentUtils {
public:
AgentUtils() {};
virtual ~AgentUtils() {};
AgentUtils() = default;
virtual ~AgentUtils() = default;
// Execute shell cmd
virtual bool exec_cmd(const std::string& command, std::string* errmsg,

View File

@ -86,7 +86,7 @@ public:
} else {
_stream << fmt::format(fmt, std::forward<Args>(args)...);
}
};
}
template <typename V>
TaggableLogger& tag(std::string_view key, const V& value) {

View File

@ -253,7 +253,7 @@ E(INVERTED_INDEX_CLUCENE_ERROR, -6002);
E(INVERTED_INDEX_FILE_NOT_FOUND, -6003);
E(INVERTED_INDEX_FILE_HIT_LIMIT, -6004);
#undef E
}; // namespace ErrorCode
} // namespace ErrorCode
// clang-format off
// whether to capture stacktrace

View File

@ -59,7 +59,7 @@ public:
// Send a Block into this sink.
virtual Status send(RuntimeState* state, vectorized::Block* block, bool eos = false) {
return Status::NotSupported("Not support send block");
};
}
// Releases all resources that were allocated in prepare()/send().
// Further send() calls are illegal after calling close().
// It must be okay to call this multiple times. Subsequent calls should

View File

@ -336,7 +336,7 @@ public:
set_whole_value_range();
}
_contain_null = contain_null;
};
}
int precision() const { return _precision; }

View File

@ -99,7 +99,7 @@ struct VOlapTablePartition {
std::vector<OlapTableIndexTablets> indexes;
VOlapTablePartition(vectorized::Block* partition_block)
: start_key {partition_block, -1}, end_key {partition_block, -1} {};
: start_key {partition_block, -1}, end_key {partition_block, -1} {}
};
class VOlapTablePartKeyComparator {

View File

@ -33,7 +33,7 @@ public:
virtual void insert_many(const std::vector<const BitmapValue*> bitmaps) = 0;
virtual bool empty() = 0;
virtual Status assign(BitmapValue* bitmap_value) = 0;
virtual void light_copy(BitmapFilterFuncBase* other) { _not_in = other->_not_in; };
virtual void light_copy(BitmapFilterFuncBase* other) { _not_in = other->_not_in; }
virtual uint16_t find_fixed_len_olap_engine(const char* data, const uint8* nullmap,
uint16_t* offsets, int number) = 0;
virtual void find_batch(const char* data, const uint8* nullmap, int number,

View File

@ -33,7 +33,7 @@ public:
template <PrimitiveType type>
static BasePtr get_function() {
return new MinMaxNumFunc<typename PrimitiveTypeTraits<type>::CppType>();
};
}
};
class HybridSetTraits {
@ -45,7 +45,7 @@ public:
using Set =
std::conditional_t<std::is_same_v<CppType, StringRef>, StringSet, HybridSet<type>>;
return new Set();
};
}
};
class BloomFilterTraits {
@ -54,7 +54,7 @@ public:
template <PrimitiveType type>
static BasePtr get_function() {
return new BloomFilterFunc<type>();
};
}
};
class BitmapFilterTraits {
@ -63,7 +63,7 @@ public:
template <PrimitiveType type>
static BasePtr get_function() {
return new BitmapFilterFunc<type>();
};
}
};
template <class Traits>

View File

@ -54,7 +54,7 @@ public:
virtual std::string as_wkt() const = 0;
virtual bool contains(const GeoShape* rhs) const { return false; }
virtual std::string to_string() const { return ""; };
virtual std::string to_string() const { return ""; }
protected:
virtual void encode(std::string* buf) = 0;

View File

@ -138,7 +138,7 @@ int __open_2(const char *path, int oflag)
/// No-ops.
int pthread_setname_np(pthread_t thread, const char *name) { return 0; }
int pthread_getname_np(pthread_t thread, char *name, size_t len) { name[0] = '\0'; return 0; };
int pthread_getname_np(pthread_t thread, char *name, size_t len) { name[0] = '\0'; return 0; }
#define SHMDIR "/dev/shm/"
@ -172,7 +172,7 @@ void __attribute__((__weak__)) explicit_bzero(void * buf, size_t len)
void __explicit_bzero_chk(void * buf, size_t len, size_t unused)
{
return explicit_bzero(buf, len);
explicit_bzero(buf, len);
}

View File

@ -18,4 +18,4 @@ int sync_file_range(int fd, off_t pos, off_t len, unsigned flags)
#else
return __syscall_ret(-ENOSYS);
#endif
}
}

View File

@ -93,19 +93,19 @@ static inline void a_store(volatile int *p, int x)
}
#define a_barrier a_barrier
static inline void a_barrier()
static inline void a_barrier(void)
{
__asm__ __volatile__( "" : : : "memory" );
}
#define a_spin a_spin
static inline void a_spin()
static inline void a_spin(void)
{
__asm__ __volatile__( "pause" : : : "memory" );
}
#define a_crash a_crash
static inline void a_crash()
static inline void a_crash(void)
{
__asm__ __volatile__( "hlt" : : : "memory" );
}

View File

@ -28,7 +28,7 @@ class HealthAction : public HttpHandler {
public:
HealthAction();
virtual ~HealthAction() {};
~HealthAction() override = default;
void handle(HttpRequest* req) override;
};

View File

@ -29,7 +29,7 @@ class StreamLoad2PCAction : public HttpHandler {
public:
StreamLoad2PCAction(ExecEnv* exec_env);
virtual ~StreamLoad2PCAction() {};
~StreamLoad2PCAction() override = default;
void handle(HttpRequest* req) override;
std::string get_success_info(const std::string txn_id, const std::string txn_operation);

View File

@ -29,7 +29,7 @@ class VersionAction : public HttpHandler {
public:
VersionAction();
virtual ~VersionAction() {};
~VersionAction() override = default;
void handle(HttpRequest* req) override;
};

View File

@ -19,8 +19,6 @@
#include <memory>
#include "http/http_common.h"
namespace doris {
namespace io {
@ -106,10 +104,10 @@ void FileCacheProfile::update(int64_t table_id, int64_t partition_id, OlapReader
}
count = _profile[table_id][partition_id];
}
if (partition_metric) [[unlikely]] {
if (partition_metric) {
partition_metric->register_entity();
}
if (table_metric) [[unlikely]] {
if (table_metric) {
table_metric->register_entity();
}
count->num_io_total.fetch_add(stats->file_cache_stats.num_io_total, std::memory_order_relaxed);

View File

@ -65,7 +65,7 @@ public:
int64_t get_oldest_match_time() const override {
return _gc_lru_queue.empty() ? 0 : _gc_lru_queue.top().last_match_time;
};
}
bool is_gc_finish() const override { return _gc_lru_queue.empty(); }

View File

@ -77,7 +77,7 @@ protected:
struct SubFileLRUComparator {
bool operator()(const T& lhs, const T& rhs) const {
return lhs.last_match_time > rhs.last_match_time;
};
}
};
size_t _cache_file_size;

View File

@ -57,7 +57,7 @@ public:
int64_t get_oldest_match_time() const override {
return _gc_lru_queue.empty() ? 0 : _gc_lru_queue.top().last_match_time;
};
}
bool is_gc_finish() const override { return _gc_lru_queue.empty(); }

View File

@ -68,7 +68,7 @@ public:
std::shared_ptr<Aws::S3::S3Client> get_client() const {
std::lock_guard lock(_client_mu);
return _client;
};
}
// Guarded by external lock.
void set_conf(S3Conf s3_conf) { _s3_conf = std::move(s3_conf); }

View File

@ -36,11 +36,11 @@ class HDFSCommonBuilder {
const std::map<std::string, std::string>& properties);
public:
HDFSCommonBuilder() : hdfs_builder(hdfsNewBuilder()) {};
~HDFSCommonBuilder() { hdfsFreeBuilder(hdfs_builder); };
HDFSCommonBuilder() : hdfs_builder(hdfsNewBuilder()) {}
~HDFSCommonBuilder() { hdfsFreeBuilder(hdfs_builder); }
hdfsBuilder* get() { return hdfs_builder; };
bool is_need_kinit() { return need_kinit; };
hdfsBuilder* get() { return hdfs_builder; }
bool is_need_kinit() const { return need_kinit; }
Status run_kinit();
private:

View File

@ -47,32 +47,32 @@ public:
return selected_size;
}
virtual void evaluate_and(vectorized::MutableColumns& block, uint16_t* sel,
uint16_t selected_size, bool* flags) const {};
uint16_t selected_size, bool* flags) const {}
virtual void evaluate_or(vectorized::MutableColumns& block, uint16_t* sel,
uint16_t selected_size, bool* flags) const {};
uint16_t selected_size, bool* flags) const {}
virtual void evaluate_vec(vectorized::MutableColumns& block, uint16_t size,
bool* flags) const {};
virtual void evaluate_vec(vectorized::MutableColumns& block, uint16_t size, bool* flags) const {
}
virtual bool evaluate_and(const std::pair<WrapperField*, WrapperField*>& statistic) const {
LOG(FATAL) << "should not reach here";
return true;
};
}
virtual bool evaluate_and(const segment_v2::BloomFilter* bf) const {
LOG(FATAL) << "should not reach here";
return true;
};
}
virtual bool can_do_bloom_filter() const { return false; }
};
class SingleColumnBlockPredicate : public BlockColumnPredicate {
public:
explicit SingleColumnBlockPredicate(const ColumnPredicate* pre) : _predicate(pre) {};
explicit SingleColumnBlockPredicate(const ColumnPredicate* pre) : _predicate(pre) {}
void get_all_column_ids(std::set<ColumnId>& column_id_set) const override {
column_id_set.insert(_predicate->column_id());
};
}
void get_all_column_predicate(std::set<const ColumnPredicate*>& predicate_set) const override {
predicate_set.insert(_predicate);
@ -115,7 +115,7 @@ public:
for (auto child_block_predicate : _block_column_predicate_vec) {
child_block_predicate->get_all_column_ids(column_id_set);
}
};
}
void get_all_column_predicate(std::set<const ColumnPredicate*>& predicate_set) const override {
for (auto child_block_predicate : _block_column_predicate_vec) {

View File

@ -143,11 +143,11 @@ public:
virtual uint16_t evaluate(const vectorized::IColumn& column, uint16_t* sel,
uint16_t size) const {
return size;
};
}
virtual void evaluate_and(const vectorized::IColumn& column, const uint16_t* sel, uint16_t size,
bool* flags) const {};
bool* flags) const {}
virtual void evaluate_or(const vectorized::IColumn& column, const uint16_t* sel, uint16_t size,
bool* flags) const {};
bool* flags) const {}
virtual bool evaluate_and(const std::pair<WrapperField*, WrapperField*>& statistic) const {
return true;

View File

@ -78,7 +78,7 @@ public:
virtual size_t get_variable_len() const { return 0; }
virtual void modify_zone_map_index(char*) const {};
virtual void modify_zone_map_index(char*) const {}
virtual Field* clone() const {
auto* local = new Field();

View File

@ -75,7 +75,7 @@ private:
char* _agg_mem;
size_t* _agg_state_offset;
RowInBlock(size_t row) : _row_pos(row) {};
RowInBlock(size_t row) : _row_pos(row) {}
void init_agg_places(char* agg_mem, size_t* agg_state_offset) {
_agg_mem = agg_mem;
@ -87,7 +87,7 @@ private:
class RowInBlockComparator {
public:
RowInBlockComparator(const Schema* schema) : _schema(schema) {};
RowInBlockComparator(const Schema* schema) : _schema(schema) {}
// call set_block before operator().
// only first time insert block to create _input_mutable_block,
// so can not Comparator of construct to set pblock

View File

@ -135,7 +135,7 @@ struct CustomPredicateCreator : public PredicateCreator<ConditionType> {
public:
using CppType = typename PredicatePrimitiveTypeTraits<Type>::PredicateFieldType;
CustomPredicateCreator(const std::function<CppType(const std::string& condition)>& convert)
: _convert(convert) {};
: _convert(convert) {}
ColumnPredicate* create(const TabletColumn& column, int index, const ConditionType& conditions,
bool opposite, MemPool* pool) override {

View File

@ -77,7 +77,7 @@ public:
// only applicable to alpha rowset, no op here
Status remove_old_files(std::vector<std::string>* files_to_remove) override {
return Status::OK();
};
}
bool check_path(const std::string& path) override;

View File

@ -238,7 +238,7 @@ public:
*n = max_fetch;
return Status::OK();
};
}
Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
vectorized::MutableColumnPtr& dst) override {

View File

@ -380,11 +380,11 @@ public:
}
return Status::OK();
};
}
Status next_batch(size_t* n, vectorized::MutableColumnPtr& dst) override {
return next_batch<>(n, dst);
};
}
Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
vectorized::MutableColumnPtr& dst) override {

View File

@ -62,7 +62,7 @@ public:
FieldType type() const { return _type; }
EncodingTypePB encoding() const { return _encoding; }
DataPagePreDecoder* get_data_page_pre_decoder() const { return _data_page_pre_decoder.get(); };
DataPagePreDecoder* get_data_page_pre_decoder() const { return _data_page_pre_decoder.get(); }
private:
friend class EncodingInfoResolver;

View File

@ -143,7 +143,7 @@ public:
Status next_batch(size_t* n, vectorized::MutableColumnPtr& dst) override {
return Status::NotSupported("frame page not implement vec op now");
};
}
Status peek_next_batch(size_t* n, vectorized::MutableColumnPtr& dst) override {
return Status::NotSupported("frame page not implement vec op now");

View File

@ -47,7 +47,7 @@ class IndexedColumnIterator;
class IndexedColumnReader {
public:
explicit IndexedColumnReader(io::FileReaderSPtr file_reader, const IndexedColumnMetaPB& meta)
: _file_reader(std::move(file_reader)), _meta(meta) {};
: _file_reader(std::move(file_reader)), _meta(meta) {}
Status load(bool use_page_cache, bool kept_in_memory);

View File

@ -127,7 +127,7 @@ class DorisCompoundDirectory::FSIndexInput : public lucene::store::BufferedIndex
FSIndexInput(SharedHandle* handle, int32_t buffer_size) : BufferedIndexInput(buffer_size) {
this->_pos = 0;
this->_handle = handle;
};
}
protected:
FSIndexInput(const FSIndexInput& clone);

View File

@ -65,7 +65,7 @@ class InvertedIndexReader {
public:
explicit InvertedIndexReader(io::FileSystemSPtr fs, const std::string& path,
const uint32_t index_id)
: _fs(std::move(fs)), _path(path), _index_id(index_id) {};
: _fs(std::move(fs)), _path(path), _index_id(index_id) {}
virtual ~InvertedIndexReader() = default;
// create a new column iterator. Client should delete returned iterator
@ -95,7 +95,7 @@ class FullTextIndexReader : public InvertedIndexReader {
public:
explicit FullTextIndexReader(io::FileSystemSPtr fs, const std::string& path,
const int64_t uniq_id)
: InvertedIndexReader(std::move(fs), path, uniq_id) {};
: InvertedIndexReader(std::move(fs), path, uniq_id) {}
~FullTextIndexReader() override = default;
Status new_iterator(const TabletIndex* index_meta, InvertedIndexIterator** iterator) override;
@ -119,7 +119,7 @@ class StringTypeInvertedIndexReader : public InvertedIndexReader {
public:
explicit StringTypeInvertedIndexReader(io::FileSystemSPtr fs, const std::string& path,
const int64_t uniq_id)
: InvertedIndexReader(std::move(fs), path, uniq_id) {};
: InvertedIndexReader(std::move(fs), path, uniq_id) {}
~StringTypeInvertedIndexReader() override = default;
Status new_iterator(const TabletIndex* index_meta, InvertedIndexIterator** iterator) override;
@ -151,8 +151,8 @@ public:
bool only_count = false);
virtual ~InvertedIndexVisitor() = default;
void set_reader(lucene::util::bkd::bkd_reader* r) { reader = r; };
lucene::util::bkd::bkd_reader* get_reader() { return reader; };
void set_reader(lucene::util::bkd::bkd_reader* r) { reader = r; }
lucene::util::bkd::bkd_reader* get_reader() { return reader; }
void visit(int rowID) override;
void visit(roaring::Roaring& r) override;

View File

@ -69,7 +69,7 @@ public:
get_parser_string_from_properties(_index_meta->properties()));
_value_key_coder = get_key_coder(field_type);
_field_name = std::wstring(field_name.begin(), field_name.end());
};
}
~InvertedIndexColumnWriterImpl() override = default;
@ -116,7 +116,7 @@ public:
_CLDELETE(_char_string_reader)
_char_string_reader = nullptr;
}
};
}
Status init_bkd_index() {
size_t value_length = sizeof(CppType);

View File

@ -115,8 +115,8 @@ public:
DCHECK_LT(_cur_idx, _index->_num_pages);
_cur_idx++;
}
int32_t page_index() const { return _cur_idx; };
const PagePointer& page() const { return _index->_pages[_cur_idx]; };
int32_t page_index() const { return _cur_idx; }
const PagePointer& page() const { return _index->_pages[_cur_idx]; }
ordinal_t first_ordinal() const { return _index->get_first_ordinal(_cur_idx); }
ordinal_t last_ordinal() const { return _index->get_last_ordinal(_cur_idx); }

View File

@ -183,7 +183,7 @@ public:
Status next_batch(size_t* n, vectorized::MutableColumnPtr& dst) override {
return Status::NotSupported("plain page not implement vec op now");
};
}
size_t count() const override {
DCHECK(_parsed);

View File

@ -229,7 +229,7 @@ public:
_cur_index += to_fetch;
*n = to_fetch;
return Status::OK();
};
}
Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
vectorized::MutableColumnPtr& dst) override {

View File

@ -105,11 +105,11 @@ public:
std::string min_key() {
DCHECK(_tablet_schema->keys_type() == UNIQUE_KEYS && _footer.has_primary_key_index_meta());
return _footer.primary_key_index_meta().min_key();
};
}
std::string max_key() {
DCHECK(_tablet_schema->keys_type() == UNIQUE_KEYS && _footer.has_primary_key_index_meta());
return _footer.primary_key_index_meta().max_key();
};
}
io::FileReaderSPtr file_reader() { return _file_reader; }

View File

@ -28,7 +28,10 @@ namespace doris {
class UniqueRowsetIdGenerator : public RowsetIdGenerator {
public:
UniqueRowsetIdGenerator(const UniqueId& backend_uid);
~UniqueRowsetIdGenerator();
~UniqueRowsetIdGenerator() override;
UniqueRowsetIdGenerator(const UniqueRowsetIdGenerator&) = delete;
UniqueRowsetIdGenerator& operator=(const UniqueRowsetIdGenerator&) = delete;
RowsetId next_id() override;
@ -48,8 +51,6 @@ private:
// to determine whether the rowset id is being used.
// But to use id_in_use() and release_id() to check it.
std::unordered_set<int64_t> _valid_rowset_id_hi;
DISALLOW_COPY_AND_ASSIGN(UniqueRowsetIdGenerator);
}; // UniqueRowsetIdGenerator
} // namespace doris

View File

@ -152,7 +152,7 @@ public:
int32_t unique_id(size_t index) const { return _unique_ids[index]; }
int32_t delete_sign_idx() const { return _delete_sign_idx; }
bool has_sequence_col() const { return _has_sequence_col; }
int32_t rowid_col_idx() const { return _rowid_col_idx; };
int32_t rowid_col_idx() const { return _rowid_col_idx; }
private:
void _init(const std::vector<TabletColumn>& cols, const std::vector<ColumnId>& col_ids,

View File

@ -101,7 +101,7 @@ protected:
virtual Status _inner_process(RowsetReaderSharedPtr rowset_reader, RowsetWriter* rowset_writer,
TabletSharedPtr new_tablet, TabletSchemaSPtr base_tablet_schema) {
return Status::NotSupported("inner process unsupported.");
};
}
bool _check_row_nums(RowsetReaderSharedPtr reader, const RowsetWriter& writer) const {
if (reader->rowset()->num_rows() != writer.num_rows() + _merged_rows + _filtered_rows) {

View File

@ -140,7 +140,7 @@ public:
bool check_rowset_id_in_unused_rowsets(const RowsetId& rowset_id);
RowsetId next_rowset_id() { return _rowset_id_generator->next_id(); };
RowsetId next_rowset_id() { return _rowset_id_generator->next_id(); }
bool rowset_id_in_use(const RowsetId& rowset_id) {
return _rowset_id_generator->id_in_use(rowset_id);

View File

@ -177,7 +177,7 @@ public:
void add_row_column();
void copy_from(const TabletSchema& tablet_schema);
std::string to_key() const;
int64_t mem_size() const { return _mem_size; };
int64_t mem_size() const { return _mem_size; }
size_t row_size() const;
int32_t field_index(const std::string& field_name) const;

View File

@ -279,7 +279,7 @@ struct RowLocation {
struct GlobalRowLoacation {
GlobalRowLoacation(uint32_t tid, RowsetId rsid, uint32_t sid, uint32_t rid)
: tablet_id(tid), row_location(rsid, sid, rid) {};
: tablet_id(tid), row_location(rsid, sid, rid) {}
uint32_t tablet_id;
RowLocation row_location;
};

View File

@ -33,13 +33,13 @@ public:
AggSinkOperatorBuilder(int32_t, ExecNode*);
OperatorPtr build_operator() override;
bool is_sink() const override { return true; };
bool is_sink() const override { return true; }
};
class AggSinkOperator final : public StreamingOperator<AggSinkOperatorBuilder> {
public:
AggSinkOperator(OperatorBuilderBase* operator_builder, ExecNode* node);
bool can_write() override { return true; };
bool can_write() override { return true; }
};
} // namespace pipeline

View File

@ -33,14 +33,14 @@ public:
OperatorPtr build_operator() override;
bool is_sink() const override { return true; };
bool is_sink() const override { return true; }
};
class AnalyticSinkOperator final : public StreamingOperator<AnalyticSinkOperatorBuilder> {
public:
AnalyticSinkOperator(OperatorBuilderBase* operator_builder, ExecNode* node);
bool can_write() override { return _node->can_write(); };
bool can_write() override { return _node->can_write(); }
};
} // namespace pipeline

View File

@ -27,7 +27,7 @@ namespace pipeline {
class AssertNumRowsOperatorBuilder final : public OperatorBuilder<vectorized::VAssertNumRowsNode> {
public:
AssertNumRowsOperatorBuilder(int32_t id, ExecNode* node)
: OperatorBuilder(id, "AssertNumRowsOperator", node) {};
: OperatorBuilder(id, "AssertNumRowsOperator", node) {}
OperatorPtr build_operator() override;
};
@ -35,7 +35,7 @@ public:
class AssertNumRowsOperator final : public StreamingOperator<AssertNumRowsOperatorBuilder> {
public:
AssertNumRowsOperator(OperatorBuilderBase* operator_builder, ExecNode* node)
: StreamingOperator(operator_builder, node) {};
: StreamingOperator(operator_builder, node) {}
};
OperatorPtr AssertNumRowsOperatorBuilder::build_operator() {

View File

@ -29,7 +29,7 @@ namespace pipeline {
class ConstValueOperatorBuilder final : public OperatorBuilder<vectorized::VUnionNode> {
public:
ConstValueOperatorBuilder(int32_t id, ExecNode* node)
: OperatorBuilder(id, "ConstValueOperator", node) {};
: OperatorBuilder(id, "ConstValueOperator", node) {}
OperatorPtr build_operator() override;
@ -39,9 +39,9 @@ public:
class ConstValueOperator final : public SourceOperator<ConstValueOperatorBuilder> {
public:
ConstValueOperator(OperatorBuilderBase* operator_builder, ExecNode* node)
: SourceOperator(operator_builder, node) {};
: SourceOperator(operator_builder, node) {}
bool can_read() override { return true; };
bool can_read() override { return true; }
};
OperatorPtr ConstValueOperatorBuilder::build_operator() {

View File

@ -36,7 +36,7 @@ class DataGenOperator : public SourceOperator<DataGenOperatorBuilder> {
public:
DataGenOperator(OperatorBuilderBase* operator_builder, ExecNode* datagen_node);
bool can_read() override { return true; };
bool can_read() override { return true; }
Status open(RuntimeState* state) override;

View File

@ -36,7 +36,7 @@ public:
class EmptySetSourceOperator final : public SourceOperator<EmptySetSourceOperatorBuilder> {
public:
EmptySetSourceOperator(OperatorBuilderBase* operator_builder, ExecNode* empty_set_node);
bool can_read() override { return true; };
bool can_read() override { return true; }
};
} // namespace pipeline

View File

@ -33,13 +33,13 @@ public:
HashJoinBuildSinkBuilder(int32_t, ExecNode*);
OperatorPtr build_operator() override;
bool is_sink() const override { return true; };
bool is_sink() const override { return true; }
};
class HashJoinBuildSink final : public StreamingOperator<HashJoinBuildSinkBuilder> {
public:
HashJoinBuildSink(OperatorBuilderBase* operator_builder, ExecNode* node);
bool can_write() override { return _node->can_sink_write(); };
bool can_write() override { return _node->can_sink_write(); }
};
} // namespace pipeline

View File

@ -33,7 +33,7 @@ class MysqlScanOperator : public SourceOperator<MysqlScanOperatorBuilder> {
public:
MysqlScanOperator(OperatorBuilderBase* operator_builder, ExecNode* mysql_scan_node);
bool can_read() override { return true; };
bool can_read() override { return true; }
Status open(RuntimeState* state) override;

View File

@ -34,13 +34,13 @@ public:
NestLoopJoinBuildOperatorBuilder(int32_t, ExecNode*);
OperatorPtr build_operator() override;
bool is_sink() const override { return true; };
bool is_sink() const override { return true; }
};
class NestLoopJoinBuildOperator final : public StreamingOperator<NestLoopJoinBuildOperatorBuilder> {
public:
NestLoopJoinBuildOperator(OperatorBuilderBase* operator_builder, ExecNode* node);
bool can_write() override { return true; };
bool can_write() override { return true; }
};
} // namespace pipeline

View File

@ -28,7 +28,7 @@ class OlapTableSinkOperatorBuilder final
: public DataSinkOperatorBuilder<stream_load::VOlapTableSink> {
public:
OlapTableSinkOperatorBuilder(int32_t id, DataSink* sink)
: DataSinkOperatorBuilder(id, "OlapTableSinkOperator", sink) {};
: DataSinkOperatorBuilder(id, "OlapTableSinkOperator", sink) {}
OperatorPtr build_operator() override;
};
@ -36,7 +36,7 @@ public:
class OlapTableSinkOperator final : public DataSinkOperator<OlapTableSinkOperatorBuilder> {
public:
OlapTableSinkOperator(OperatorBuilderBase* operator_builder, DataSink* sink)
: DataSinkOperator(operator_builder, sink) {};
: DataSinkOperator(operator_builder, sink) {}
bool can_write() override { return true; } // TODO: need use mem_limit
};

View File

@ -140,13 +140,13 @@ public:
explicit OperatorBase(OperatorBuilderBase* operator_builder);
virtual ~OperatorBase() = default;
virtual std::string get_name() const { return _operator_builder->get_name(); };
virtual std::string get_name() const { return _operator_builder->get_name(); }
bool is_sink() const;
bool is_source() const;
virtual Status init(const TDataSink& tsink) { return Status::OK(); };
virtual Status init(const TDataSink& tsink) { return Status::OK(); }
// Prepare for running. (e.g. resource allocation, etc.)
virtual Status prepare(RuntimeState* state) = 0;
@ -189,7 +189,7 @@ public:
virtual Status get_block(RuntimeState* runtime_state, vectorized::Block* block,
SourceState& result_state) {
return Status::OK();
};
}
/**
* Push data to the sink operator.
@ -253,7 +253,7 @@ public:
std::remove_pointer_t<decltype(std::declval<OperatorBuilderType>().exec_node())>;
DataSinkOperator(OperatorBuilderBase* builder, DataSink* sink)
: OperatorBase(builder), _sink(reinterpret_cast<NodeType*>(sink)) {};
: OperatorBase(builder), _sink(reinterpret_cast<NodeType*>(sink)) {}
~DataSinkOperator() override = default;
@ -312,7 +312,7 @@ public:
std::remove_pointer_t<decltype(std::declval<OperatorBuilderType>().exec_node())>;
StreamingOperator(OperatorBuilderBase* builder, ExecNode* node)
: OperatorBase(builder), _node(reinterpret_cast<NodeType*>(node)) {};
: OperatorBase(builder), _node(reinterpret_cast<NodeType*>(node)) {}
~StreamingOperator() override = default;
@ -384,7 +384,7 @@ public:
std::remove_pointer_t<decltype(std::declval<OperatorBuilderType>().exec_node())>;
SourceOperator(OperatorBuilderBase* builder, ExecNode* node)
: StreamingOperator<OperatorBuilderType>(builder, node) {};
: StreamingOperator<OperatorBuilderType>(builder, node) {}
~SourceOperator() override = default;
@ -419,7 +419,7 @@ public:
StatefulOperator(OperatorBuilderBase* builder, ExecNode* node)
: StreamingOperator<OperatorBuilderType>(builder, node),
_child_block(new vectorized::Block),
_child_source_state(SourceState::DEPEND_ON_SOURCE) {};
_child_source_state(SourceState::DEPEND_ON_SOURCE) {}
virtual ~StatefulOperator() = default;

View File

@ -48,7 +48,7 @@ public:
SetSourceOperator(OperatorBuilderBase* builder,
vectorized::VSetOperationNode<is_intersect>* set_node);
Status open(RuntimeState* /*state*/) override { return Status::OK(); };
Status open(RuntimeState* /*state*/) override { return Status::OK(); }
};
} // namespace pipeline

View File

@ -40,7 +40,7 @@ class SortSinkOperator final : public StreamingOperator<SortSinkOperatorBuilder>
public:
SortSinkOperator(OperatorBuilderBase* operator_builder, ExecNode* sort_node);
bool can_write() override { return true; };
bool can_write() override { return true; }
};
} // namespace pipeline

View File

@ -35,8 +35,8 @@ public:
OperatorPtr build_operator() override;
bool is_sink() const override { return true; };
bool is_source() const override { return false; };
bool is_sink() const override { return true; }
bool is_source() const override { return false; }
private:
std::shared_ptr<DataQueue> _data_queue;

View File

@ -28,7 +28,7 @@ namespace pipeline {
class TableSinkOperatorBuilder final : public DataSinkOperatorBuilder<vectorized::VTableSink> {
public:
TableSinkOperatorBuilder(int32_t id, DataSink* sink)
: DataSinkOperatorBuilder(id, "TableSinkOperator", sink) {};
: DataSinkOperatorBuilder(id, "TableSinkOperator", sink) {}
OperatorPtr build_operator() override;
};
@ -36,7 +36,7 @@ public:
class TableSinkOperator final : public DataSinkOperator<TableSinkOperatorBuilder> {
public:
TableSinkOperator(OperatorBuilderBase* operator_builder, DataSink* sink)
: DataSinkOperator(operator_builder, sink) {};
: DataSinkOperator(operator_builder, sink) {}
bool can_write() override { return true; }
};

View File

@ -35,7 +35,7 @@ public:
OperatorPtr build_operator() override;
bool is_sink() const override { return true; };
bool is_sink() const override { return true; }
private:
int _cur_child_id;
@ -47,7 +47,7 @@ public:
UnionSinkOperator(OperatorBuilderBase* operator_builder, int child_id, ExecNode* node,
std::shared_ptr<DataQueue> queue);
bool can_write() override { return true; };
bool can_write() override { return true; }
Status sink(RuntimeState* state, vectorized::Block* in_block,
SourceState source_state) override;

View File

@ -367,7 +367,7 @@ public:
}
set_time(year, month, day, hour, minute, second, microsecond);
return true;
};
}
uint64_t daynr() const { return calc_daynr(_year, _month, _day); }

View File

@ -165,7 +165,7 @@ public:
TUniqueId querytid;
parse_id(queryid, &querytid);
return querytid;
};
}
static std::string process_mem_log_str() {
return fmt::format(

View File

@ -29,7 +29,7 @@ class QueryStatisticsRecvr;
class NodeStatistics {
public:
NodeStatistics() : peak_memory_bytes(0) {};
NodeStatistics() : peak_memory_bytes(0) {}
void add_peak_memory(int64_t peak_memory) { this->peak_memory_bytes += peak_memory; }

View File

@ -33,9 +33,9 @@ class Block;
// abstract class of the result writer
class ResultWriter {
public:
ResultWriter() {};
ResultWriter(bool output_object_data) : _output_object_data(output_object_data) {};
~ResultWriter() {};
ResultWriter() {}
ResultWriter(bool output_object_data) : _output_object_data(output_object_data) {}
~ResultWriter() {}
virtual Status init(RuntimeState* state) = 0;
@ -53,7 +53,7 @@ public:
virtual void set_header_info(const std::string& header_type, const std::string& header) {
_header_type = header_type;
_header = header;
};
}
protected:
int64_t _written_rows = 0; // number of rows written

View File

@ -49,7 +49,7 @@ public:
bool inited() {
std::unique_lock<std::shared_mutex> wlock(_rwlock);
return _inited;
};
}
void set_tablet_schema(TabletSchemaSPtr tablet_schema) {
std::unique_lock<std::shared_mutex> wlock(_rwlock);

View File

@ -115,7 +115,7 @@ public:
Status query_status() {
std::lock_guard<std::mutex> l(_process_status_lock);
return _process_status;
};
}
// Appends error to the _error_log if there is space
bool log_error(const std::string& error);

View File

@ -69,12 +69,12 @@ public:
#define PRIMITIVE_VISIT(TYPE) \
arrow::Status Visit(const arrow::TYPE& type) override { return _visit(type); }
PRIMITIVE_VISIT(Int8Type);
PRIMITIVE_VISIT(Int16Type);
PRIMITIVE_VISIT(Int32Type);
PRIMITIVE_VISIT(Int64Type);
PRIMITIVE_VISIT(FloatType);
PRIMITIVE_VISIT(DoubleType);
PRIMITIVE_VISIT(Int8Type)
PRIMITIVE_VISIT(Int16Type)
PRIMITIVE_VISIT(Int32Type)
PRIMITIVE_VISIT(Int64Type)
PRIMITIVE_VISIT(FloatType)
PRIMITIVE_VISIT(DoubleType)
#undef PRIMITIVE_VISIT

View File

@ -274,7 +274,7 @@ public:
case 1:
h ^= (uint64_t)data[0];
h *= m;
};
}
h ^= h >> r;
h *= m;

View File

@ -28,7 +28,7 @@ namespace doris {
template <class T>
class PathTrie {
public:
PathTrie() : _root("/", "*"), _root_value(nullptr), _separator('/') {};
PathTrie() : _root("/", "*"), _root_value(nullptr), _separator('/') {}
~PathTrie() {
if (_root_value != nullptr) {

View File

@ -50,7 +50,7 @@ void ProgressUpdater::update(int64_t delta) {
if (num_complete >= _total) {
// Always print the final 100% complete
VLOG_DEBUG << _label << " 100\% Complete (" << num_complete << " out of " << _total << ")";
VLOG_DEBUG << _label << " 100%% Complete (" << num_complete << " out of " << _total << ")";
return;
}
@ -60,7 +60,7 @@ void ProgressUpdater::update(int64_t delta) {
if (new_percentage - old_percentage > _update_period) {
// Only update shared variable if this guy was the latest.
__sync_val_compare_and_swap(&_last_output_percentage, old_percentage, new_percentage);
VLOG_DEBUG << _label << ": " << new_percentage << "\% Complete (" << num_complete
VLOG_DEBUG << _label << ": " << new_percentage << "%% Complete (" << num_complete
<< " out of " << _total << ")";
}
}

View File

@ -430,9 +430,9 @@ public:
: _function(function),
_data(std::make_unique<AggregateData[]>(function->size_of_data())) {
_function->create(_data.get());
};
}
~AggregateFunctionGuard() { _function->destroy(_data.get()); }
AggregateDataPtr data() { return _data.get(); };
AggregateDataPtr data() { return _data.get(); }
private:
const IAggregateFunction* _function;

View File

@ -34,7 +34,7 @@ struct AggregateFunctionSortData {
Block block;
// The construct only support the template compiler, useless
AggregateFunctionSortData() {};
AggregateFunctionSortData() : sort_desc() {};
AggregateFunctionSortData(SortDescription sort_desc, const Block& block)
: sort_desc(std::move(sort_desc)), block(block.clone_empty()) {}

View File

@ -349,7 +349,7 @@ public:
virtual void update_hashes_with_value(std::vector<SipHash>& hashes,
const uint8_t* __restrict null_data = nullptr) const {
LOG(FATAL) << "update_hashes_with_value siphash not supported";
};
}
/// Update state of hash function with value of n elements to avoid the virtual function call
/// null_data to mark whether need to do hash compute, null_data == nullptr
@ -358,7 +358,7 @@ public:
virtual void update_hashes_with_value(uint64_t* __restrict hashes,
const uint8_t* __restrict null_data = nullptr) const {
LOG(FATAL) << "update_hashes_with_value xxhash not supported";
};
}
/// Update state of crc32 hash function with value of n elements to avoid the virtual function call
/// null_data to mark whether need to do hash compute, null_data == nullptr
@ -366,7 +366,7 @@ public:
virtual void update_crcs_with_value(std::vector<uint64_t>& hash, PrimitiveType type,
const uint8_t* __restrict null_data = nullptr) const {
LOG(FATAL) << "update_crcs_with_value not supported";
};
}
/** Removes elements that don't match the filter.
* Is used in WHERE and HAVING operations.
@ -388,7 +388,7 @@ public:
virtual Status filter_by_selector(const uint16_t* sel, size_t sel_size, IColumn* col_ptr) {
LOG(FATAL) << "column not support filter_by_selector";
__builtin_unreachable();
};
}
/// Permutes elements using specified permutation. Is used in sortings.
/// limit - if it isn't 0, puts only first limit elements in the result.
@ -446,7 +446,7 @@ public:
virtual void replicate(const uint32_t* counts, size_t target_size, IColumn& column,
size_t begin = 0, int count_sz = -1) const {
LOG(FATAL) << "not support";
};
}
/** Split column to smaller columns. Each value goes to column index, selected by corresponding element of 'selector'.
* Selector must contain values from 0 to num_columns - 1.
@ -539,7 +539,7 @@ public:
virtual bool is_dummy() const { return false; }
/// Clear data of column, just like vector clear
virtual void clear() {};
virtual void clear() {}
/** Memory layout properties.
*
@ -704,6 +704,6 @@ namespace doris {
struct ColumnPtrWrapper {
vectorized::ColumnPtr column_ptr;
ColumnPtrWrapper(vectorized::ColumnPtr col) : column_ptr(col) {};
ColumnPtrWrapper(vectorized::ColumnPtr col) : column_ptr(col) {}
};
} // namespace doris

View File

@ -203,8 +203,8 @@ public:
virtual void update_hashes_with_value(
std::vector<SipHash>& hashes,
const uint8_t* __restrict null_data = nullptr) const override {
// TODO add hash function
};
// TODO add hash function
}
virtual void update_hashes_with_value(
uint64_t* __restrict hashes,

View File

@ -167,15 +167,15 @@ public:
[[noreturn]] ColumnPtr filter(const IColumn::Filter& filt,
ssize_t result_size_hint) const override {
LOG(FATAL) << "filter not supported in ColumnDictionary";
};
}
[[noreturn]] ColumnPtr permute(const IColumn::Permutation& perm, size_t limit) const override {
LOG(FATAL) << "permute not supported in ColumnDictionary";
};
}
[[noreturn]] ColumnPtr replicate(const IColumn::Offsets& replicate_offsets) const override {
LOG(FATAL) << "replicate not supported in ColumnDictionary";
};
}
[[noreturn]] MutableColumns scatter(IColumn::ColumnIndex num_columns,
const IColumn::Selector& selector) const override {
@ -320,7 +320,7 @@ public:
class Dictionary {
public:
Dictionary() : _dict_data(new DictContainer()), _total_str_len(0) {};
Dictionary() : _dict_data(new DictContainer()), _total_str_len(0) {}
void reserve(size_t n) { _dict_data->reserve(n); }

View File

@ -255,7 +255,7 @@ public:
offset += len;
offsets.push_back(offset);
}
};
}
void insert_many_strings(const StringRef* strings, size_t num) override {
size_t new_size = 0;

View File

@ -422,11 +422,11 @@ public:
[[noreturn]] ColumnPtr filter(const IColumn::Filter& filt,
ssize_t result_size_hint) const override {
LOG(FATAL) << "filter not supported in PredicateColumnType";
};
}
[[noreturn]] ColumnPtr permute(const IColumn::Permutation& perm, size_t limit) const override {
LOG(FATAL) << "permute not supported in PredicateColumnType";
};
}
Container& get_data() { return data; }
@ -434,7 +434,7 @@ public:
[[noreturn]] ColumnPtr replicate(const IColumn::Offsets& replicate_offsets) const override {
LOG(FATAL) << "replicate not supported in PredicateColumnType";
};
}
[[noreturn]] MutableColumns scatter(IColumn::ColumnIndex num_columns,
const IColumn::Selector& selector) const override {

View File

@ -20,6 +20,7 @@
#pragma once
#include <climits>
#include <functional>
#include <ostream>
#include <string>
@ -242,8 +243,9 @@ struct StringRef {
StringRef trim() const;
// support for type_limit
static constexpr char MIN_CHAR = 0x00;
static constexpr char MAX_CHAR = 0xFF;
static constexpr char MIN_CHAR = 0;
static constexpr char MAX_CHAR = char(
UCHAR_MAX); // We will convert char to uchar and compare, so we define max_char to unsigned char max.
static StringRef min_string_val();
static StringRef max_string_val();

View File

@ -112,7 +112,7 @@ public:
if (_block_view) {
_block_view->unref();
}
};
}
size_t row_id() const { return _row_id; }

View File

@ -32,7 +32,6 @@
namespace doris {
class PBlock;
class PColumn;
enum FieldType;
namespace vectorized {

View File

@ -38,7 +38,7 @@ public:
};
ORCFileInputStream(const std::string& file_name, io::FileReaderSPtr file_reader)
: _file_name(file_name), _file_reader(file_reader) {};
: _file_name(file_name), _file_reader(file_reader) {}
~ORCFileInputStream() override = default;

View File

@ -58,7 +58,7 @@ struct RowRange {
struct ParquetReadColumn {
ParquetReadColumn(int parquet_col_id, const std::string& file_slot_name)
: _parquet_col_id(parquet_col_id), _file_slot_name(file_slot_name) {};
: _parquet_col_id(parquet_col_id), _file_slot_name(file_slot_name) {}
int _parquet_col_id;
const std::string& _file_slot_name;
@ -223,7 +223,7 @@ void Decoder::init_decimal_converter(DataTypePtr& data_type) {
class FixLengthDecoder final : public Decoder {
public:
FixLengthDecoder(tparquet::Type::type physical_type) : _physical_type(physical_type) {};
FixLengthDecoder(tparquet::Type::type physical_type) : _physical_type(physical_type) {}
~FixLengthDecoder() override = default;
Status decode_values(MutableColumnPtr& doris_column, DataTypePtr& data_type,

View File

@ -114,7 +114,7 @@ public:
std::string debug_string() const;
int32_t size() const { return _fields.size(); };
int32_t size() const { return _fields.size(); }
};
} // namespace doris::vectorized

View File

@ -110,7 +110,7 @@ public:
return load_page_data();
}
// The remaining number of values in current page(including null values). Decreased when reading or skipping.
uint32_t remaining_num_values() const { return _remaining_num_values; };
uint32_t remaining_num_values() const { return _remaining_num_values; }
// null values are generated from definition levels
// the caller should maintain the consistency after analyzing null values from definition levels.
void insert_null_values(MutableColumnPtr& doris_column, size_t num_values);

View File

@ -30,12 +30,12 @@ public:
tparquet::ColumnMetaData metadata)
: _chunk_start_offset(chunk_start_offset),
_chunk_length(chunk_length),
_metadata(metadata) {};
_metadata(metadata) {}
~ParquetColumnMetadata() = default;
int64_t start_offset() const { return _chunk_start_offset; };
int64_t size() const { return _chunk_length; };
tparquet::ColumnMetaData t_metadata() { return _metadata; };
int64_t start_offset() const { return _chunk_start_offset; }
int64_t size() const { return _chunk_length; }
tparquet::ColumnMetaData t_metadata() { return _metadata; }
private:
int64_t _chunk_start_offset;
@ -97,13 +97,13 @@ public:
};
ParquetColumnReader(const std::vector<RowRange>& row_ranges, cctz::time_zone* ctz)
: _row_ranges(row_ranges), _ctz(ctz) {};
: _row_ranges(row_ranges), _ctz(ctz) {}
virtual ~ParquetColumnReader() {
if (_stream_reader != nullptr) {
delete _stream_reader;
_stream_reader = nullptr;
}
};
}
virtual Status read_column_data(ColumnPtr& doris_column, DataTypePtr& type,
ColumnSelectVector& select_vector, size_t batch_size,
size_t* read_rows, bool* eof) = 0;
@ -137,8 +137,8 @@ protected:
class ScalarColumnReader : public ParquetColumnReader {
public:
ScalarColumnReader(const std::vector<RowRange>& row_ranges, cctz::time_zone* ctz)
: ParquetColumnReader(row_ranges, ctz) {};
~ScalarColumnReader() override { close(); };
: ParquetColumnReader(row_ranges, ctz) {}
~ScalarColumnReader() override { close(); }
Status init(io::FileReaderSPtr file, FieldSchema* field, tparquet::ColumnChunk* chunk,
size_t max_buf_size);
Status read_column_data(ColumnPtr& doris_column, DataTypePtr& type,
@ -153,8 +153,8 @@ public:
class ArrayColumnReader : public ParquetColumnReader {
public:
ArrayColumnReader(const std::vector<RowRange>& row_ranges, cctz::time_zone* ctz)
: ParquetColumnReader(row_ranges, ctz) {};
~ArrayColumnReader() override { close(); };
: ParquetColumnReader(row_ranges, ctz) {}
~ArrayColumnReader() override { close(); }
Status init(io::FileReaderSPtr file, FieldSchema* field, tparquet::ColumnChunk* chunk,
size_t max_buf_size);
Status read_column_data(ColumnPtr& doris_column, DataTypePtr& type,

View File

@ -27,7 +27,7 @@ public:
FileMetaData(tparquet::FileMetaData& metadata);
~FileMetaData() = default;
Status init_schema();
const FieldDescriptor& schema() const { return _schema; };
const FieldDescriptor& schema() const { return _schema; }
const tparquet::FileMetaData& to_thrift();
std::string debug_string() const;

View File

@ -338,8 +338,6 @@ void NewOlapScanNode::set_scan_ranges(const std::vector<TScanRangeParams>& scan_
COUNTER_UPDATE(_tablet_counter, 1);
}
// telemetry::set_current_span_attribute(_tablet_counter);
return;
}
std::string NewOlapScanNode::get_name() {

View File

@ -479,11 +479,6 @@ void NewOlapScanner::_update_counters_before_close() {
COUNTER_UPDATE(olap_parent->_conditions_filtered_counter, stats.rows_conditions_filtered);
COUNTER_UPDATE(olap_parent->_key_range_filtered_counter, stats.rows_key_range_filtered);
size_t timer_count = sizeof(stats.general_debug_ns) / sizeof(*stats.general_debug_ns);
for (size_t i = 0; i < timer_count; ++i) {
COUNTER_UPDATE(olap_parent->_general_debug_timer[i], stats.general_debug_ns[i]);
}
COUNTER_UPDATE(olap_parent->_total_pages_num_counter, stats.total_pages_num);
COUNTER_UPDATE(olap_parent->_cached_pages_num_counter, stats.cached_pages_num);

View File

@ -53,7 +53,7 @@ protected:
Status _get_next_reader();
// TODO: cast input block columns type to string.
Status _cast_src_block(Block* block) { return Status::OK(); };
Status _cast_src_block(Block* block) { return Status::OK(); }
protected:
std::unique_ptr<TextConverter> _text_converter;

View File

@ -30,7 +30,7 @@ public:
Status init(const TPlanNode& tnode, RuntimeState* state = nullptr) override;
Status prepare(RuntimeState* state) override;
void set_scan_ranges(const std::vector<TScanRangeParams>& scan_ranges) override;
const TMetaScanNode& scan_params() { return _scan_params; };
const TMetaScanNode& scan_params() { return _scan_params; }
private:
Status _init_profile() override;

View File

@ -54,7 +54,7 @@ public:
std::string debug_string() const override {
return fmt::format(" VBitmapPredicate:{}", VExpr::debug_string());
};
}
private:
std::shared_ptr<BitmapFilterFuncBase> _filter;

View File

@ -151,7 +151,7 @@ public:
/// expr.
Status get_const_col(VExprContext* context, ColumnPtrWrapper** output);
int fn_context_index() const { return _fn_context_index; };
int fn_context_index() const { return _fn_context_index; }
static const VExpr* expr_without_cast(const VExpr* expr) {
if (expr->node_type() == doris::TExprNodeType::CAST_EXPR) {

View File

@ -40,7 +40,7 @@ public:
std::string debug_string() const override;
const FunctionBasePtr function() { return _function; };
const FunctionBasePtr function() { return _function; }
bool is_not_in() const { return _is_not_in; };

View File

@ -31,7 +31,7 @@ public:
if (should_init) {
init(node);
}
};
}
Status execute(VExprContext* context, vectorized::Block* block, int* result_column_id) override;
const std::string& expr_name() const override { return _expr_name; }
VExpr* clone(doris::ObjectPool* pool) const override { return pool->add(new VLiteral(*this)); }

View File

@ -31,7 +31,7 @@ public:
VExprContext* context) override;
doris::Status open(doris::RuntimeState* state, VExprContext* context,
FunctionContext::FunctionStateScope scope) override;
std::string debug_string() const override { return _impl->debug_string(); };
std::string debug_string() const override { return _impl->debug_string(); }
bool is_constant() const override;
void close(doris::RuntimeState* state, VExprContext* context,
FunctionContext::FunctionStateScope scope) override;

View File

@ -41,10 +41,10 @@ public:
}
/// Get the main function name.
String get_name() const override { return fn_.name.function_name; };
String get_name() const override { return fn_.name.function_name; }
const DataTypes& get_argument_types() const override { return _argument_types; };
const DataTypePtr& get_return_type() const override { return _return_type; };
const DataTypes& get_argument_types() const override { return _argument_types; }
const DataTypePtr& get_return_type() const override { return _return_type; }
PreparedFunctionPtr prepare(FunctionContext* context, const Block& sample_block,
const ColumnNumbers& arguments, size_t result) const override {

View File

@ -72,10 +72,10 @@ public:
String get_name() const override {
return fmt::format("{}: [{}/{}]", _tfn.name.function_name, _tfn.hdfs_location,
_tfn.scalar_fn.symbol);
};
}
const DataTypes& get_argument_types() const override { return _argument_types; };
const DataTypePtr& get_return_type() const override { return _return_type; };
const DataTypes& get_argument_types() const override { return _argument_types; }
const DataTypePtr& get_return_type() const override { return _return_type; }
PreparedFunctionPtr prepare(FunctionContext* context, const Block& sample_block,
const ColumnNumbers& arguments, size_t result) const override {

Some files were not shown because too many files have changed in this diff Show More