This is an automated email from the ASF dual-hosted git repository.
caiconghui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 6ed59bb98b [refactor](code_style) remove useless inline #8933
6ed59bb98b is described below
commit 6ed59bb98b521a65fb58711e5c2a7334763c2544
Author: zbtzbtzbt <[email protected]>
AuthorDate: Sun Apr 10 18:29:55 2022 +0800
[refactor](code_style) remove useless inline #8933
1.Member functions defined in a class are inline by default (implicitly),
and do not need to be added
2.inline is a keyword used for implementation, which has no effect when
placed before the function declaration
---
be/src/agent/task_worker_pool.h | 4 +-
be/src/exec/decompressor.h | 12 ++---
be/src/exec/hash_table.h | 2 +-
be/src/exec/olap_scan_node.h | 2 +-
be/src/exec/plain_text_line_reader.h | 6 +--
be/src/exprs/agg_fn_evaluator.h | 4 +-
be/src/exprs/aggregate_functions.cpp | 2 +-
be/src/exprs/anyval_util.h | 10 ++--
be/src/exprs/block_bloom_filter.hpp | 2 +-
be/src/exprs/new_agg_fn_evaluator.h | 6 +--
be/src/exprs/new_in_predicate.h | 2 +-
be/src/exprs/slot_ref.h | 2 +-
be/src/olap/aggregate_func.h | 6 +--
be/src/olap/base_tablet.h | 28 +++++-----
be/src/olap/byte_buffer.h | 16 +++---
be/src/olap/collect_iterator.h | 4 +-
be/src/olap/field.h | 38 +++++++-------
be/src/olap/file_stream.h | 20 ++++----
be/src/olap/hll.h | 2 +-
be/src/olap/in_stream.h | 4 +-
be/src/olap/lru_cache.h | 8 +--
be/src/olap/olap_cond.h | 2 +-
be/src/olap/out_stream.h | 2 +-
be/src/olap/row_block.h | 6 +--
be/src/olap/row_cursor.h | 16 +++---
be/src/olap/rowset/rowset.h | 2 +-
be/src/olap/rowset/run_length_integer_reader.h | 4 +-
be/src/olap/rowset/run_length_integer_writer.h | 12 ++---
be/src/olap/rowset/segment_group.h | 30 +++++------
be/src/olap/rowset/segment_reader.h | 10 ++--
.../olap/rowset/segment_v2/bitmap_index_reader.h | 4 +-
be/src/olap/rowset/segment_v2/bitshuffle_page.h | 2 +-
be/src/olap/rowset/segment_v2/column_reader.h | 2 +-
be/src/olap/rowset/segment_v2/column_writer.h | 8 +--
be/src/olap/rowset/segment_v2/index_page.h | 8 +--
be/src/olap/rowset/segment_v2/plain_page.h | 2 +-
be/src/olap/selection_vector.h | 2 +-
be/src/olap/short_key_index.h | 2 +-
be/src/olap/skiplist.h | 2 +-
be/src/olap/stream_index_common.h | 2 +-
be/src/olap/tablet.h | 60 +++++++++++-----------
be/src/olap/tablet_meta.h | 50 +++++++++---------
be/src/olap/tablet_schema.h | 56 ++++++++++----------
be/src/olap/txn_manager.h | 8 +--
be/src/olap/types.h | 52 +++++++++----------
be/src/runtime/buffered_tuple_stream3.h | 6 +--
be/src/runtime/bufferpool/buffer_pool.h | 6 +--
be/src/runtime/bufferpool/free_list.h | 4 +-
be/src/runtime/bufferpool/reservation_tracker.h | 2 +-
be/src/runtime/cache/cache_utils.h | 2 +-
be/src/runtime/collection_value.h | 24 ++++-----
be/src/runtime/data_stream_mgr.h | 2 +-
be/src/runtime/data_stream_sender.h | 2 +-
be/src/runtime/datetime_value.h | 6 +--
be/src/runtime/decimalv2_value.h | 6 +--
be/src/runtime/disk_io_mgr_internal.h | 2 +-
be/src/runtime/mem_tracker.h | 2 +-
be/src/runtime/spill_sorter.cc | 2 +-
be/src/runtime/string_value.h | 4 +-
be/src/runtime/thread_mem_tracker_mgr.h | 4 +-
be/src/runtime/types.h | 18 +++----
be/src/runtime/vectorized_row_batch.h | 4 +-
be/src/util/brpc_client_cache.h | 28 +++++-----
be/src/util/buffer_builder.hpp | 4 +-
be/src/util/core_local.h | 6 +--
be/src/util/frame_of_reference_coding.h | 2 +-
be/src/util/histogram.h | 12 ++---
be/src/util/logging.h | 4 +-
be/src/util/mutex.h | 2 +-
be/src/util/s3_uri.h | 8 +--
be/src/util/spinlock.h | 2 +-
be/src/util/tdigest.h | 34 ++++++------
be/src/util/tuple_row_zorder_compare.cpp | 6 +--
be/src/util/tuple_row_zorder_compare.h | 6 +--
be/src/vec/columns/column_dictionary.h | 12 ++---
be/src/vec/common/columns_hashing_impl.h | 2 +-
be/src/vec/common/uint128.h | 24 ++++-----
be/src/vec/core/block.h | 4 +-
be/src/vec/functions/functions_logical.cpp | 6 +--
be/src/vec/olap/vcollect_iterator.h | 6 +--
be/src/vec/runtime/vdata_stream_mgr.h | 2 +-
be/src/vec/runtime/vdatetime_value.h | 8 +--
be/src/vec/runtime/vsorted_run_merger.h | 2 +-
be/src/vec/sink/vdata_stream_sender.h | 2 +-
84 files changed, 401 insertions(+), 401 deletions(-)
diff --git a/be/src/agent/task_worker_pool.h b/be/src/agent/task_worker_pool.h
index 55685137f9..eec4ad2c65 100644
--- a/be/src/agent/task_worker_pool.h
+++ b/be/src/agent/task_worker_pool.h
@@ -84,7 +84,7 @@ public:
MULTI_THREADS // 1 or more threads allowed in the pool
};
- inline const std::string TYPE_STRING(TaskWorkerType type) {
+ const std::string TYPE_STRING(TaskWorkerType type) {
switch (type) {
case CREATE_TABLE:
return "CREATE_TABLE";
@@ -139,7 +139,7 @@ public:
}
}
- inline const std::string TYPE_STRING(ReportType type) {
+ const std::string TYPE_STRING(ReportType type) {
switch (type) {
case TASK:
return "TASK";
diff --git a/be/src/exec/decompressor.h b/be/src/exec/decompressor.h
index 55bdd03e55..e53ebd5711 100644
--- a/be/src/exec/decompressor.h
+++ b/be/src/exec/decompressor.h
@@ -157,30 +157,30 @@ private:
enum LzoChecksum { CHECK_NONE, CHECK_CRC32, CHECK_ADLER };
private:
- inline uint8_t* get_uint8(uint8_t* ptr, uint8_t* value) {
+ uint8_t* get_uint8(uint8_t* ptr, uint8_t* value) {
*value = *ptr;
return ptr + sizeof(uint8_t);
}
- inline uint8_t* get_uint16(uint8_t* ptr, uint16_t* value) {
+ uint8_t* get_uint16(uint8_t* ptr, uint16_t* value) {
*value = *ptr << 8 | *(ptr + 1);
return ptr + sizeof(uint16_t);
}
- inline uint8_t* get_uint32(uint8_t* ptr, uint32_t* value) {
+ uint8_t* get_uint32(uint8_t* ptr, uint32_t* value) {
*value = (*ptr << 24) | (*(ptr + 1) << 16) | (*(ptr + 2) << 8) | *(ptr
+ 3);
return ptr + sizeof(uint32_t);
}
- inline LzoChecksum header_type(int flags) {
+ LzoChecksum header_type(int flags) {
return (flags & F_H_CRC32) ? CHECK_CRC32 : CHECK_ADLER;
}
- inline LzoChecksum input_type(int flags) {
+ LzoChecksum input_type(int flags) {
return (flags & F_CRC32_C) ? CHECK_CRC32 : (flags & F_ADLER32_C) ?
CHECK_ADLER : CHECK_NONE;
}
- inline LzoChecksum output_type(int flags) {
+ LzoChecksum output_type(int flags) {
return (flags & F_CRC32_D) ? CHECK_CRC32 : (flags & F_ADLER32_D) ?
CHECK_ADLER : CHECK_NONE;
}
diff --git a/be/src/exec/hash_table.h b/be/src/exec/hash_table.h
index d58824d710..d1bcb13a4c 100644
--- a/be/src/exec/hash_table.h
+++ b/be/src/exec/hash_table.h
@@ -194,7 +194,7 @@ public:
// just the build row addresses.
std::string debug_string(bool skip_empty, const RowDescriptor* build_desc);
- inline std::pair<int64_t, int64_t> minmax_node();
+ std::pair<int64_t, int64_t> minmax_node();
// Load factor that will trigger growing the hash table on insert. This is
// defined as the number of non-empty buckets / total_buckets
diff --git a/be/src/exec/olap_scan_node.h b/be/src/exec/olap_scan_node.h
index 8ebe610960..688c4517a3 100644
--- a/be/src/exec/olap_scan_node.h
+++ b/be/src/exec/olap_scan_node.h
@@ -57,7 +57,7 @@ public:
Status collect_query_statistics(QueryStatistics* statistics) override;
Status close(RuntimeState* state) override;
Status set_scan_ranges(const std::vector<TScanRangeParams>& scan_ranges)
override;
- inline void set_no_agg_finalize() { _need_agg_finalize = false; }
+ void set_no_agg_finalize() { _need_agg_finalize = false; }
protected:
struct HeapType {
diff --git a/be/src/exec/plain_text_line_reader.h
b/be/src/exec/plain_text_line_reader.h
index c0fb06ad87..d412c17dba 100644
--- a/be/src/exec/plain_text_line_reader.h
+++ b/be/src/exec/plain_text_line_reader.h
@@ -41,11 +41,11 @@ public:
private:
bool update_eof();
- inline size_t output_buf_read_remaining() const { return _output_buf_limit
- _output_buf_pos; }
+ size_t output_buf_read_remaining() const { return _output_buf_limit -
_output_buf_pos; }
- inline size_t input_buf_read_remaining() const { return _input_buf_limit -
_input_buf_pos; }
+ size_t input_buf_read_remaining() const { return _input_buf_limit -
_input_buf_pos; }
- inline bool done() { return _file_eof && output_buf_read_remaining() == 0;
}
+ bool done() { return _file_eof && output_buf_read_remaining() == 0; }
// find line delimiter from 'start' to 'start' + len,
// return line delimiter pos if found, otherwise return nullptr.
diff --git a/be/src/exprs/agg_fn_evaluator.h b/be/src/exprs/agg_fn_evaluator.h
index 2d70b074a1..9ccaa11c6b 100644
--- a/be/src/exprs/agg_fn_evaluator.h
+++ b/be/src/exprs/agg_fn_evaluator.h
@@ -146,8 +146,8 @@ public:
// Indicate which type of this value : int type;
static const size_t DATETIME_SIZE = 16;
- inline void update_mem_limlits(int len);
- inline void update_mem_trackers(bool is_filter, bool is_add_buckets, int
len);
+ void update_mem_limlits(int len);
+ void update_mem_trackers(bool is_filter, bool is_add_buckets, int len);
bool count_distinct_data_filter(TupleRow* row, Tuple* dst);
bool sum_distinct_data_filter(TupleRow* row, Tuple* dst);
bool is_multi_distinct() { return _is_multi_distinct; }
diff --git a/be/src/exprs/aggregate_functions.cpp
b/be/src/exprs/aggregate_functions.cpp
index 9e442b3081..f8bfa84ea3 100644
--- a/be/src/exprs/aggregate_functions.cpp
+++ b/be/src/exprs/aggregate_functions.cpp
@@ -1368,7 +1368,7 @@ public:
static void destroy(const StringVal& dst) { delete
(MultiDistinctStringCountState*)dst.ptr; }
- inline void update(StringValue* sv) { _set.insert(sv); }
+ void update(StringValue* sv) { _set.insert(sv); }
StringVal serialize(FunctionContext* ctx) {
// calculate total serialize buffer length
diff --git a/be/src/exprs/anyval_util.h b/be/src/exprs/anyval_util.h
index 5c605b6a70..545bce9d4b 100644
--- a/be/src/exprs/anyval_util.h
+++ b/be/src/exprs/anyval_util.h
@@ -409,30 +409,30 @@ public:
/// Templated equality functions. These assume the input values are not
nullptr.
template <typename T>
- static inline bool equals(const PrimitiveType& type, const T& x, const T&
y) {
+ static bool equals(const PrimitiveType& type, const T& x, const T& y) {
return equals_internal(x, y);
}
/// Templated equality functions. These assume the input values are not
nullptr.
template <typename T>
- static inline bool equals(const T& x, const T& y) {
+ static bool equals(const T& x, const T& y) {
return equals_internal(x, y);
}
template <typename T>
- static inline bool equals(const TypeDescriptor& type, const T& x, const T&
y) {
+ static bool equals(const TypeDescriptor& type, const T& x, const T& y) {
return equals_internal(x, y);
}
template <typename T>
- static inline bool equals(const FunctionContext::TypeDesc& type, const T&
x, const T& y) {
+ static bool equals(const FunctionContext::TypeDesc& type, const T& x,
const T& y) {
return equals_internal(x, y);
}
private:
/// Implementations of Equals().
template <typename T>
- static inline bool equals_internal(const T& x, const T& y);
+ static bool equals_internal(const T& x, const T& y);
};
template <typename T>
diff --git a/be/src/exprs/block_bloom_filter.hpp
b/be/src/exprs/block_bloom_filter.hpp
index 539f5f80e0..0179a83126 100644
--- a/be/src/exprs/block_bloom_filter.hpp
+++ b/be/src/exprs/block_bloom_filter.hpp
@@ -185,7 +185,7 @@ private:
static constexpr uint32_t kRehash[8] __attribute__((aligned(32))) =
{BLOOM_HASH_CONSTANTS};
// Get 32 more bits of randomness from a 32-bit hash:
- static inline uint32_t rehash32to32(const uint32_t hash) {
+ static uint32_t rehash32to32(const uint32_t hash) {
// Constants generated by uuidgen(1) with the -r flag
static constexpr uint64_t m = 0x7850f11ec6d14889ULL;
static constexpr uint64_t a = 0x6773610597ca4c63ULL;
diff --git a/be/src/exprs/new_agg_fn_evaluator.h
b/be/src/exprs/new_agg_fn_evaluator.h
index 462c4705a1..a335f63039 100644
--- a/be/src/exprs/new_agg_fn_evaluator.h
+++ b/be/src/exprs/new_agg_fn_evaluator.h
@@ -231,8 +231,8 @@ private:
NewAggFnEvaluator(const AggFn& agg_fn, MemPool* mem_pool, bool is_clone);
/// Return the intermediate type of the aggregate function.
- inline const SlotDescriptor& intermediate_slot_desc() const;
- inline const TypeDescriptor& intermediate_type() const;
+ const SlotDescriptor& intermediate_slot_desc() const;
+ const TypeDescriptor& intermediate_type() const;
/// The interpreted path for the UDA's Update() function. It sets up the
arguments to
/// call 'fn' is either the 'update_fn_' or 'merge_fn_' of agg_fn_,
depending on whether
@@ -245,7 +245,7 @@ private:
void Update(const TupleRow* row, Tuple* dst, void* fn);
/// Writes the result in src into dst pointed to by dst_slot_desc
- inline void SetDstSlot(const doris_udf::AnyVal* src, const SlotDescriptor&
dst_slot_desc,
+ void SetDstSlot(const doris_udf::AnyVal* src, const SlotDescriptor&
dst_slot_desc,
Tuple* dst);
/// Sets up the arguments to call 'fn'. This converts from the agg-expr
signature,
diff --git a/be/src/exprs/new_in_predicate.h b/be/src/exprs/new_in_predicate.h
index 6238894a8d..b859b33e97 100644
--- a/be/src/exprs/new_in_predicate.h
+++ b/be/src/exprs/new_in_predicate.h
@@ -323,7 +323,7 @@ private:
/// The templated function that provides the implementation for all the
In() and NotIn()
/// functions.
template <typename T, typename SetType, bool not_in, Strategy strategy>
- static inline doris_udf::BooleanVal
templated_in(doris_udf::FunctionContext* context,
+ static doris_udf::BooleanVal templated_in(doris_udf::FunctionContext*
context,
const T& val, int
num_args, const T* args);
/// Initializes an SetLookupState in ctx.
diff --git a/be/src/exprs/slot_ref.h b/be/src/exprs/slot_ref.h
index 3aa52b93de..1effcbfd3c 100644
--- a/be/src/exprs/slot_ref.h
+++ b/be/src/exprs/slot_ref.h
@@ -56,7 +56,7 @@ public:
virtual bool is_bound(std::vector<TupleId>* tuple_ids) const override;
virtual int get_slot_ids(std::vector<SlotId>* slot_ids) const override;
SlotId slot_id() const { return _slot_id; }
- inline NullIndicatorOffset null_indicator_offset() const { return
_null_indicator_offset; }
+ NullIndicatorOffset null_indicator_offset() const { return
_null_indicator_offset; }
virtual doris_udf::BooleanVal get_boolean_val(ExprContext* context,
TupleRow*) override;
virtual doris_udf::TinyIntVal get_tiny_int_val(ExprContext* context,
TupleRow*) override;
diff --git a/be/src/olap/aggregate_func.h b/be/src/olap/aggregate_func.h
index 8ea52bd89f..ade087deb1 100644
--- a/be/src/olap/aggregate_func.h
+++ b/be/src/olap/aggregate_func.h
@@ -46,7 +46,7 @@ public:
// Memory Note: For plain memory can be allocated from *mem_pool, whose
lifetime
// will last util finalize function is called. Memory allocated from heap
should
// be freed in finalize function to avoid memory leak.
- inline void init(RowCursorCell* dst, const char* src, bool src_null,
MemPool* mem_pool,
+ void init(RowCursorCell* dst, const char* src, bool src_null, MemPool*
mem_pool,
ObjectPool* agg_pool) const {
_init_fn(dst, src, src_null, mem_pool, agg_pool);
}
@@ -58,7 +58,7 @@ public:
// will be added to sum.
// Memory Note: Same with init function.
- inline void update(RowCursorCell* dst, const RowCursorCell& src, MemPool*
mem_pool) const {
+ void update(RowCursorCell* dst, const RowCursorCell& src, MemPool*
mem_pool) const {
_update_fn(dst, src, mem_pool);
}
@@ -70,7 +70,7 @@ public:
// Memory Note: All heap memory allocated in init and update function
should be freed
// before this function return. Memory allocated from *mem_pool will be
still available
// and will be freed by client.
- inline void finalize(RowCursorCell* src, MemPool* mem_pool) const {
+ void finalize(RowCursorCell* src, MemPool* mem_pool) const {
_finalize_fn(src, mem_pool);
}
diff --git a/be/src/olap/base_tablet.h b/be/src/olap/base_tablet.h
index 5529ce488b..4c6946931f 100644
--- a/be/src/olap/base_tablet.h
+++ b/be/src/olap/base_tablet.h
@@ -37,31 +37,31 @@ public:
BaseTablet(TabletMetaSharedPtr tablet_meta, const StorageParamPB&
storage_param, DataDir* data_dir);
virtual ~BaseTablet();
- inline DataDir* data_dir() const;
+ DataDir* data_dir() const;
FilePathDesc tablet_path_desc() const;
TabletState tablet_state() const { return _state; }
OLAPStatus set_tablet_state(TabletState state);
// Property encapsulated in TabletMeta
- inline const TabletMetaSharedPtr tablet_meta();
+ const TabletMetaSharedPtr tablet_meta();
- inline bool is_memory() const;
- inline TabletUid tablet_uid() const;
- inline int64_t table_id() const;
+ bool is_memory() const;
+ TabletUid tablet_uid() const;
+ int64_t table_id() const;
// Returns a string can be used to uniquely identify a tablet.
// The result string will often be printed to the log.
- inline const std::string full_name() const;
- inline int64_t partition_id() const;
- inline int64_t tablet_id() const;
- inline int32_t schema_hash() const;
- inline int16_t shard_id();
- inline const int64_t creation_time() const;
- inline void set_creation_time(int64_t creation_time);
- inline bool equal(int64_t tablet_id, int32_t schema_hash);
+ const std::string full_name() const;
+ int64_t partition_id() const;
+ int64_t tablet_id() const;
+ int32_t schema_hash() const;
+ int16_t shard_id();
+ const int64_t creation_time() const;
+ void set_creation_time(int64_t creation_time);
+ bool equal(int64_t tablet_id, int32_t schema_hash);
// properties encapsulated in TabletSchema
- inline const TabletSchema& tablet_schema() const;
+ const TabletSchema& tablet_schema() const;
protected:
void _gen_tablet_path();
diff --git a/be/src/olap/byte_buffer.h b/be/src/olap/byte_buffer.h
index c3e982f385..8afbffd6f3 100644
--- a/be/src/olap/byte_buffer.h
+++ b/be/src/olap/byte_buffer.h
@@ -70,9 +70,9 @@ public:
// The old interface is still preserved, maybe it will be used?
static StorageByteBuffer* mmap(FileHandler* handler, uint64_t offset, int
prot, int flags);
- inline uint64_t capacity() const { return _capacity; }
+ uint64_t capacity() const { return _capacity; }
- inline uint64_t position() const { return _position; }
+ uint64_t position() const { return _position; }
// Set the position of the internal pointer
// If the new position is greater than or equal to limit, return
OLAP_ERR_INPUT_PARAMETER_ERROR
OLAPStatus set_position(uint64_t new_position) {
@@ -84,7 +84,7 @@ public:
}
}
- inline uint64_t limit() const { return _limit; }
+ uint64_t limit() const { return _limit; }
//set new limit
//If limit is greater than capacity, return OLAP_ERR_INPUT_PARAMETER_ERROR
//If position is greater than the new limit, set position equal to limit
@@ -102,7 +102,7 @@ public:
return OLAP_SUCCESS;
}
- inline uint64_t remaining() const { return _limit - _position; }
+ uint64_t remaining() const { return _limit - _position; }
// Set limit to current position
// set position to 0
@@ -116,7 +116,7 @@ public:
// The following three read functions are inline optimized
// Read one byte of data, increase position after completion
- inline OLAPStatus get(char* result) {
+ OLAPStatus get(char* result) {
if (OLAP_LIKELY(_position < _limit)) {
*result = _array[_position++];
return OLAP_SUCCESS;
@@ -126,7 +126,7 @@ public:
}
// Read one byte of data at the specified location
- inline OLAPStatus get(uint64_t index, char* result) {
+ OLAPStatus get(uint64_t index, char* result) {
if (OLAP_LIKELY(index < _limit)) {
*result = _array[index];
return OLAP_SUCCESS;
@@ -136,7 +136,7 @@ public:
}
// Read a piece of data of length length to dst, and increase the position
after completion
- inline OLAPStatus get(char* dst, uint64_t dst_size, uint64_t length) {
+ OLAPStatus get(char* dst, uint64_t dst_size, uint64_t length) {
// Not enough data to read
if (OLAP_UNLIKELY(length > remaining())) {
return OLAP_ERR_OUT_OF_BOUND;
@@ -153,7 +153,7 @@ public:
}
// Read dst_size long data to dst
- inline OLAPStatus get(char* dst, uint64_t dst_size) { return get(dst,
dst_size, dst_size); }
+ OLAPStatus get(char* dst, uint64_t dst_size) { return get(dst, dst_size,
dst_size); }
// Write a byte, increment position when done
// If position >= limit before writing, return OLAP_ERR_BUFFER_OVERFLOW
diff --git a/be/src/olap/collect_iterator.h b/be/src/olap/collect_iterator.h
index 228d629fcb..04886558b6 100644
--- a/be/src/olap/collect_iterator.h
+++ b/be/src/olap/collect_iterator.h
@@ -171,8 +171,8 @@ private:
~Level1Iterator();
private:
- inline OLAPStatus _merge_next(const RowCursor** row, bool*
delete_flag);
- inline OLAPStatus _normal_next(const RowCursor** row, bool*
delete_flag);
+ OLAPStatus _merge_next(const RowCursor** row, bool* delete_flag);
+ OLAPStatus _normal_next(const RowCursor** row, bool* delete_flag);
// Each LevelIterator corresponds to a rowset reader,
// it will be cleared after '_heap' has been initilized when '_merge
== true'.
diff --git a/be/src/olap/field.h b/be/src/olap/field.h
index 191edddde3..3950df4ab8 100644
--- a/be/src/olap/field.h
+++ b/be/src/olap/field.h
@@ -59,31 +59,31 @@ public:
virtual ~Field() = default;
- inline size_t size() const { return _type_info->size(); }
- inline int32_t length() const { return _length; }
- inline size_t field_size() const { return size() + 1; }
- inline size_t index_size() const { return _index_size; }
- inline const std::string& name() const { return _name; }
+ size_t size() const { return _type_info->size(); }
+ int32_t length() const { return _length; }
+ size_t field_size() const { return size() + 1; }
+ size_t index_size() const { return _index_size; }
+ const std::string& name() const { return _name; }
- virtual inline void set_to_max(char* buf) const { return
_type_info->set_to_max(buf); }
- virtual inline void set_to_zone_map_max(char* buf) const {
set_to_max(buf); }
+ virtual void set_to_max(char* buf) const { return
_type_info->set_to_max(buf); }
+ virtual void set_to_zone_map_max(char* buf) const { set_to_max(buf); }
- virtual inline void set_to_min(char* buf) const { return
_type_info->set_to_min(buf); }
- virtual inline void set_to_zone_map_min(char* buf) const {
set_to_min(buf); }
+ virtual void set_to_min(char* buf) const { return
_type_info->set_to_min(buf); }
+ virtual void set_to_zone_map_min(char* buf) const { set_to_min(buf); }
void set_long_text_buf(char** buf) { _long_text_buf = buf; }
// This function allocate memory from pool, other than allocate_memory
// reserve memory from continuous memory.
- virtual inline char* allocate_value(MemPool* pool) const {
+ virtual char* allocate_value(MemPool* pool) const {
return (char*)pool->allocate(_type_info->size());
}
- virtual inline char* allocate_zone_map_value(MemPool* pool) const {
+ virtual char* allocate_zone_map_value(MemPool* pool) const {
return allocate_value(pool);
}
- inline void agg_update(RowCursorCell* dest, const RowCursorCell& src,
+ void agg_update(RowCursorCell* dest, const RowCursorCell& src,
MemPool* mem_pool = nullptr) const {
if (type() == OLAP_FIELD_TYPE_STRING && mem_pool == nullptr &&
!src.is_null()) {
auto dst_slice =
reinterpret_cast<Slice*>(dest->mutable_cell_ptr());
@@ -96,7 +96,7 @@ public:
_agg_info->update(dest, src, mem_pool);
}
- inline void agg_finalize(RowCursorCell* dst, MemPool* mem_pool) const {
+ void agg_finalize(RowCursorCell* dst, MemPool* mem_pool) const {
_agg_info->finalize(dst, mem_pool);
}
@@ -172,7 +172,7 @@ public:
// Used to compare short key index. Because short key will truncate
// a varchar column, this function will handle in this condition.
template <typename LhsCellType, typename RhsCellType>
- inline int index_cmp(const LhsCellType& lhs, const RhsCellType& rhs) const;
+ int index_cmp(const LhsCellType& lhs, const RhsCellType& rhs) const;
// Copy source cell's content to destination cell directly.
// For string type, this function assume that destination has
@@ -224,18 +224,18 @@ public:
}
// deep copy field content from `src` to `dst` without null-byte
- inline void deep_copy_content(char* dst, const char* src, MemPool*
mem_pool) const {
+ void deep_copy_content(char* dst, const char* src, MemPool* mem_pool)
const {
_type_info->deep_copy(dst, src, mem_pool);
}
// shallow copy field content from `src` to `dst` without null-byte.
// for string like type, shallow copy only copies Slice, not the actual
data pointed by slice.
- inline void shallow_copy_content(char* dst, const char* src) const {
+ void shallow_copy_content(char* dst, const char* src) const {
_type_info->shallow_copy(dst, src);
}
//convert and copy field from src to desc
- inline OLAPStatus convert_from(char* dest, const char* src, const
TypeInfo* src_type,
+ OLAPStatus convert_from(char* dest, const char* src, const TypeInfo*
src_type,
MemPool* mem_pool) const {
return _type_info->convert_from(dest, src, src_type, mem_pool,
get_variable_len());
}
@@ -246,7 +246,7 @@ public:
// used by init scan key stored in string format
// value_string should end with '\0'
- inline OLAPStatus from_string(char* buf, const std::string& value_string)
const {
+ OLAPStatus from_string(char* buf, const std::string& value_string) const {
if (type() == OLAP_FIELD_TYPE_STRING && !value_string.empty()) {
auto slice = reinterpret_cast<Slice*>(buf);
if (slice->size < value_string.size()) {
@@ -260,7 +260,7 @@ public:
// convert inner value to string
// performance is not considered, only for debug use
- inline std::string to_string(const char* src) const { return
_type_info->to_string(src); }
+ std::string to_string(const char* src) const { return
_type_info->to_string(src); }
template <typename CellType>
std::string debug_string(const CellType& cell) const {
diff --git a/be/src/olap/file_stream.h b/be/src/olap/file_stream.h
index d33454a77e..a120a07b13 100644
--- a/be/src/olap/file_stream.h
+++ b/be/src/olap/file_stream.h
@@ -62,7 +62,7 @@ public:
~ReadOnlyFileStream() { SAFE_DELETE(_compressed_helper); }
- inline OLAPStatus init() {
+ OLAPStatus init() {
_compressed_helper = StorageByteBuffer::create(_compress_buffer_size);
if (nullptr == _compressed_helper) {
OLAP_LOG_WARNING("fail to create compressed buffer");
@@ -73,20 +73,20 @@ public:
return OLAP_SUCCESS;
}
- inline void reset(uint64_t offset, uint64_t length) {
_file_cursor.reset(offset, length); }
+ void reset(uint64_t offset, uint64_t length) { _file_cursor.reset(offset,
length); }
// 从数据流中读取一个字节,内部指针后移
// 如果数据流结束, 返回OLAP_ERR_COLUMN_STREAM_EOF
- inline OLAPStatus read(char* byte);
+ OLAPStatus read(char* byte);
// 从数据流读入一段数据
// Input:
// buffer - 存储读入的数据
// buf_size - 输入时给出buffer的大小,返回时给出实际读取的字节数
// 如果数据流结束, 返回OLAP_ERR_COLUMN_STREAM_EOF
- inline OLAPStatus read(char* buffer, uint64_t* buf_size);
+ OLAPStatus read(char* buffer, uint64_t* buf_size);
- inline OLAPStatus read_all(char* buffer, uint64_t* buf_size);
+ OLAPStatus read_all(char* buffer, uint64_t* buf_size);
// 设置读取的位置
OLAPStatus seek(PositionProvider* position);
@@ -109,7 +109,7 @@ public:
size_t get_buffer_size() { return _compress_buffer_size; }
- inline void get_buf(char** buf, uint32_t* remaining_bytes) {
+ void get_buf(char** buf, uint32_t* remaining_bytes) {
if (UNLIKELY(_uncompressed == nullptr)) {
*buf = nullptr;
*remaining_bytes = 0;
@@ -119,11 +119,11 @@ public:
}
}
- inline void get_position(uint32_t* position) { *position =
_uncompressed->position(); }
+ void get_position(uint32_t* position) { *position =
_uncompressed->position(); }
- inline void set_position(uint32_t pos) { _uncompressed->set_position(pos);
}
+ void set_position(uint32_t pos) { _uncompressed->set_position(pos); }
- inline int remaining() {
+ int remaining() {
if (_uncompressed == nullptr) {
return 0;
}
@@ -167,7 +167,7 @@ private:
size_t length() { return _length; }
- inline bool eof() { return _used == _length; }
+ bool eof() { return _used == _length; }
OLAPStatus seek(size_t offset) {
if (offset > _length) {
diff --git a/be/src/olap/hll.h b/be/src/olap/hll.h
index dc157f886e..47cae354e7 100644
--- a/be/src/olap/hll.h
+++ b/be/src/olap/hll.h
@@ -280,7 +280,7 @@ private:
void _convert_explicit_to_register();
// update one hash value into this registers
- inline void _update_registers(uint64_t hash_value) {
+ void _update_registers(uint64_t hash_value) {
// Use the lower bits to index into the number of streams and then
// find the first 1 bit after the index bits.
int idx = hash_value % HLL_REGISTERS_COUNT;
diff --git a/be/src/olap/in_stream.h b/be/src/olap/in_stream.h
index 492097c5ab..e4786b0c74 100644
--- a/be/src/olap/in_stream.h
+++ b/be/src/olap/in_stream.h
@@ -64,14 +64,14 @@ public:
// 从数据流中读取一个字节,内部指针后移
// 如果数据流结束, 返回OLAP_ERR_COLUMN_STREAM_EOF
- inline OLAPStatus read(char* byte);
+ OLAPStatus read(char* byte);
// 从数据流读入一段数据
// Input:
// buffer - 存储读入的数据
// buf_size - 输入时给出buffer的大小,返回时给出实际读取的字节数
// 如果数据流结束, 返回OLAP_ERR_COLUMN_STREAM_EOF
- inline OLAPStatus read(char* buffer, uint64_t* buf_size);
+ OLAPStatus read(char* buffer, uint64_t* buf_size);
// 设置读取的位置
OLAPStatus seek(PositionProvider* position);
diff --git a/be/src/olap/lru_cache.h b/be/src/olap/lru_cache.h
index 21e6e9742d..51e1d0ad1b 100644
--- a/be/src/olap/lru_cache.h
+++ b/be/src/olap/lru_cache.h
@@ -106,13 +106,13 @@ public:
// Return a string that contains the copy of the referenced data.
std::string to_string() const { return std::string(_data, _size); }
- inline bool operator==(const CacheKey& other) const {
+ bool operator==(const CacheKey& other) const {
return ((size() == other.size()) && (memcmp(data(), other.data(),
size()) == 0));
}
- inline bool operator!=(const CacheKey& other) const { return !(*this ==
other); }
+ bool operator!=(const CacheKey& other) const { return !(*this == other); }
- inline int compare(const CacheKey& b) const {
+ int compare(const CacheKey& b) const {
const size_t min_len = (_size < b._size) ? _size : b._size;
int r = memcmp(_data, b._data, min_len);
if (r == 0) {
@@ -379,7 +379,7 @@ private:
void update_cache_metrics() const;
private:
- static inline uint32_t _hash_slice(const CacheKey& s);
+ static uint32_t _hash_slice(const CacheKey& s);
static uint32_t _shard(uint32_t hash);
std::string _name;
diff --git a/be/src/olap/olap_cond.h b/be/src/olap/olap_cond.h
index 6146859d00..ef11c7b229 100644
--- a/be/src/olap/olap_cond.h
+++ b/be/src/olap/olap_cond.h
@@ -132,7 +132,7 @@ public:
return false;
}
- inline bool is_key() const { return _is_key; }
+ bool is_key() const { return _is_key; }
const std::vector<Cond*>& conds() const { return _conds; }
diff --git a/be/src/olap/out_stream.h b/be/src/olap/out_stream.h
index 533f6a1fdb..266a1eb590 100644
--- a/be/src/olap/out_stream.h
+++ b/be/src/olap/out_stream.h
@@ -47,7 +47,7 @@ public:
~OutStream();
// Output a byte to the stream
- inline OLAPStatus write(char byte) {
+ OLAPStatus write(char byte) {
OLAPStatus res = OLAP_SUCCESS;
if (_current == nullptr) {
res = _create_new_input_buffer();
diff --git a/be/src/olap/row_block.h b/be/src/olap/row_block.h
index 6b1dd02554..122ee01b8a 100644
--- a/be/src/olap/row_block.h
+++ b/be/src/olap/row_block.h
@@ -67,14 +67,14 @@ public:
// 目前只考虑定长,因此在函数可以分配内存资源。
void init(const RowBlockInfo& block_info);
- inline void get_row(uint32_t row_index, RowCursor* cursor) const {
+ void get_row(uint32_t row_index, RowCursor* cursor) const {
cursor->attach(_mem_buf + row_index * _mem_row_bytes);
}
// TODO(yingchun): why not use _pos directly?
template <typename RowType>
- inline void set_row(uint32_t row_index, const RowType& row) const {
+ void set_row(uint32_t row_index, const RowType& row) const {
memcpy(_mem_buf + row_index * _mem_row_bytes, row.row_ptr(),
_mem_row_bytes);
}
@@ -88,7 +88,7 @@ public:
// Return field pointer, this pointer point to the nullbyte before the
field
// layout is nullbyte|Field
- inline char* field_ptr(size_t row, size_t col) const {
+ char* field_ptr(size_t row, size_t col) const {
return _mem_buf + _mem_row_bytes * row + _field_offset_in_memory[col];
}
diff --git a/be/src/olap/row_cursor.h b/be/src/olap/row_cursor.h
index e94e83293e..6c2deab233 100644
--- a/be/src/olap/row_cursor.h
+++ b/be/src/olap/row_cursor.h
@@ -66,7 +66,7 @@ public:
RowCursorCell cell(uint32_t cid) const { return
RowCursorCell(nullable_cell_ptr(cid)); }
// RowCursor received a continuous buf
- inline void attach(char* buf) { _fixed_buf = buf; }
+ void attach(char* buf) { _fixed_buf = buf; }
// Output the index of a column to buf
void write_index_by_index(size_t index, char* index_ptr) const {
@@ -106,7 +106,7 @@ public:
const size_t get_index_size(size_t index) const { return
column_schema(index)->index_size(); }
- inline bool is_delete() const {
+ bool is_delete() const {
auto sign_idx = _schema->delete_sign_idx();
if (sign_idx < 0) {
return false;
@@ -118,11 +118,11 @@ public:
OLAPStatus build_max_key();
OLAPStatus build_min_key();
- inline char* get_buf() const { return _fixed_buf; }
+ char* get_buf() const { return _fixed_buf; }
// this two functions is used in unit test
- inline size_t get_fixed_len() const { return _fixed_len; }
- inline size_t get_variable_len() const { return _variable_len; }
+ size_t get_fixed_len() const { return _fixed_len; }
+ size_t get_variable_len() const { return _variable_len; }
// Get column nullable pointer with column id
// TODO(zc): make this return const char*
@@ -131,11 +131,11 @@ public:
bool is_null(size_t index) const { return
*reinterpret_cast<bool*>(nullable_cell_ptr(index)); }
- inline void set_null(size_t index) const {
+ void set_null(size_t index) const {
*reinterpret_cast<bool*>(nullable_cell_ptr(index)) = true;
}
- inline void set_not_null(size_t index) const {
+ void set_not_null(size_t index) const {
*reinterpret_cast<bool*>(nullable_cell_ptr(index)) = false;
}
@@ -153,7 +153,7 @@ private:
const std::vector<uint32_t>& columns);
// common init function
OLAPStatus _init(const std::vector<TabletColumn>& schema, const
std::vector<uint32_t>& columns);
- inline OLAPStatus _alloc_buf();
+ OLAPStatus _alloc_buf();
OLAPStatus _init_scan_key(const TabletSchema& schema, const
std::vector<std::string>& scan_keys);
diff --git a/be/src/olap/rowset/rowset.h b/be/src/olap/rowset/rowset.h
index a6b533ef15..61feae841e 100644
--- a/be/src/olap/rowset/rowset.h
+++ b/be/src/olap/rowset/rowset.h
@@ -156,7 +156,7 @@ public:
int64_t num_segments() const { return rowset_meta()->num_segments(); }
void to_rowset_pb(RowsetMetaPB* rs_meta) { return
rowset_meta()->to_rowset_pb(rs_meta); }
const RowsetMetaPB& get_rowset_pb() { return
rowset_meta()->get_rowset_pb(); }
- inline KeysType keys_type() { return _schema->keys_type(); }
+ KeysType keys_type() { return _schema->keys_type(); }
// remove all files in this rowset
// TODO should we rename the method to remove_files() to be more specific?
diff --git a/be/src/olap/rowset/run_length_integer_reader.h
b/be/src/olap/rowset/run_length_integer_reader.h
index 36aa121c22..1b94c961b7 100644
--- a/be/src/olap/rowset/run_length_integer_reader.h
+++ b/be/src/olap/rowset/run_length_integer_reader.h
@@ -33,9 +33,9 @@ class RunLengthIntegerReader {
public:
explicit RunLengthIntegerReader(ReadOnlyFileStream* input, bool is_singed);
~RunLengthIntegerReader() {}
- inline bool has_next() const { return _used != _num_literals ||
!_input->eof(); }
+ bool has_next() const { return _used != _num_literals || !_input->eof(); }
// 获取下一条数据, 如果没有更多的数据了, 返回OLAP_ERR_DATA_EOF
- inline OLAPStatus next(int64_t* value) {
+ OLAPStatus next(int64_t* value) {
OLAPStatus res = OLAP_SUCCESS;
if (OLAP_UNLIKELY(_used == _num_literals)) {
diff --git a/be/src/olap/rowset/run_length_integer_writer.h
b/be/src/olap/rowset/run_length_integer_writer.h
index 11095c5ccf..c95b627ea3 100644
--- a/be/src/olap/rowset/run_length_integer_writer.h
+++ b/be/src/olap/rowset/run_length_integer_writer.h
@@ -155,8 +155,8 @@ private:
uint8_t length_low : 8;
char blob[];
- inline uint16_t length() const { return (((uint16_t)length_msb) << 8)
| length_low; }
- inline void set_length(uint16_t length) {
+ uint16_t length() const { return (((uint16_t)length_msb) << 8) |
length_low; }
+ void set_length(uint16_t length) {
length_msb = (length >> 8) & 0x01;
length_low = length & 0xff;
}
@@ -169,8 +169,8 @@ private:
uint8_t patch_length : 5, gap_width : 3;
char blob[];
- inline uint16_t length() const { return (((uint16_t)length_msb) << 8)
| length_low; }
- inline void set_length(uint16_t length) {
+ uint16_t length() const { return (((uint16_t)length_msb) << 8) |
length_low; }
+ void set_length(uint16_t length) {
length_msb = (length >> 8) & 0x01;
length_low = length & 0xff;
}
@@ -181,8 +181,8 @@ private:
uint8_t length_low : 8;
char blob[];
- inline uint16_t length() const { return (((uint16_t)length_msb) << 8)
| length_low; }
- inline void set_length(uint16_t length) {
+ uint16_t length() const { return (((uint16_t)length_msb) << 8) |
length_low; }
+ void set_length(uint16_t length) {
length_msb = (length >> 8) & 0x01;
length_low = length & 0xff;
}
diff --git a/be/src/olap/rowset/segment_group.h
b/be/src/olap/rowset/segment_group.h
index 09302feee5..de84ef030a 100644
--- a/be/src/olap/rowset/segment_group.h
+++ b/be/src/olap/rowset/segment_group.h
@@ -140,27 +140,27 @@ public:
// delete all files (*.idx; *.dat)
bool delete_all_files();
- inline Version version() const { return _version; }
- inline void set_version(Version version) { _version = version; }
+ Version version() const { return _version; }
+ void set_version(Version version) { _version = version; }
- inline bool is_pending() const { return _is_pending; }
- inline void set_pending_finished() { _is_pending = false; }
+ bool is_pending() const { return _is_pending; }
+ void set_pending_finished() { _is_pending = false; }
- inline TPartitionId partition_id() const { return _partition_id; }
- inline TTransactionId transaction_id() const { return _txn_id; }
+ TPartitionId partition_id() const { return _partition_id; }
+ TTransactionId transaction_id() const { return _txn_id; }
- inline bool delete_flag() const { return _delete_flag; }
+ bool delete_flag() const { return _delete_flag; }
- inline int32_t segment_group_id() const { return _segment_group_id; }
- inline void set_segment_group_id(int32_t segment_group_id) {
+ int32_t segment_group_id() const { return _segment_group_id; }
+ void set_segment_group_id(int32_t segment_group_id) {
_segment_group_id = segment_group_id;
}
- inline PUniqueId load_id() const { return _load_id; }
- inline void set_load_id(const PUniqueId& load_id) { _load_id = load_id; }
+ PUniqueId load_id() const { return _load_id; }
+ void set_load_id(const PUniqueId& load_id) { _load_id = load_id; }
- inline int32_t num_segments() const { return _num_segments; }
- inline void set_num_segments(int32_t num_segments) { _num_segments =
num_segments; }
+ int32_t num_segments() const { return _num_segments; }
+ void set_num_segments(int32_t num_segments) { _num_segments =
num_segments; }
size_t index_size() const { return _index.index_size(); }
@@ -191,11 +191,11 @@ public:
return _index.get_row_block_position(pos, rbp);
}
- inline const FileHeader<ColumnDataHeaderMessage>* get_seg_pb(uint32_t
seg_id) const {
+ const FileHeader<ColumnDataHeaderMessage>* get_seg_pb(uint32_t seg_id)
const {
return &(_seg_pb_map.at(seg_id));
}
- inline bool get_null_supported(uint32_t seg_id) { return
_index.get_null_supported(seg_id); }
+ bool get_null_supported(uint32_t seg_id) { return
_index.get_null_supported(seg_id); }
std::string construct_index_file_path(const std::string& snapshot_path,
int32_t segment_id) const;
diff --git a/be/src/olap/rowset/segment_reader.h
b/be/src/olap/rowset/segment_reader.h
index 91464ac2ca..148f8f3e6b 100644
--- a/be/src/olap/rowset/segment_reader.h
+++ b/be/src/olap/rowset/segment_reader.h
@@ -127,11 +127,11 @@ private:
// Determine whether the current column needs to be read
// When _include_columns is empty, return true directly
- inline bool _is_column_included(ColumnId column_unique_id) {
+ bool _is_column_included(ColumnId column_unique_id) {
return _include_columns.count(column_unique_id) != 0;
}
- inline bool _is_bf_column_included(ColumnId column_unique_id) {
+ bool _is_bf_column_included(ColumnId column_unique_id) {
return _include_bf_columns.count(column_unique_id) != 0;
}
@@ -189,13 +189,13 @@ private:
OLAPStatus _reset_readers();
// Get the current table-level schema.
- inline const TabletSchema& tablet_schema() { return
_segment_group->get_tablet_schema(); }
+ const TabletSchema& tablet_schema() { return
_segment_group->get_tablet_schema(); }
- inline const ColumnDataHeaderMessage& _header_message() { return
_file_header->message(); }
+ const ColumnDataHeaderMessage& _header_message() { return
_file_header->message(); }
OLAPStatus _init_include_blocks(uint32_t first_block, uint32_t last_block);
- inline const int32_t _get_included_row_index_stream_num() {
+ const int32_t _get_included_row_index_stream_num() {
int32_t included_row_index_stream_num = 0;
for (int32_t i = 0; i < _header_message().stream_info_size(); ++i) {
const StreamInfoMessage& message =
_header_message().stream_info(i);
diff --git a/be/src/olap/rowset/segment_v2/bitmap_index_reader.h
b/be/src/olap/rowset/segment_v2/bitmap_index_reader.h
index d5b4e2ca02..e3dd46b951 100644
--- a/be/src/olap/rowset/segment_v2/bitmap_index_reader.h
+++ b/be/src/olap/rowset/segment_v2/bitmap_index_reader.h
@@ -98,9 +98,9 @@ public:
// Read and union all bitmaps in range [from, to) into `result`
Status read_union_bitmap(rowid_t from, rowid_t to, roaring::Roaring*
result);
- inline rowid_t bitmap_nums() const { return _reader->bitmap_nums(); }
+ rowid_t bitmap_nums() const { return _reader->bitmap_nums(); }
- inline rowid_t current_ordinal() const { return _current_rowid; }
+ rowid_t current_ordinal() const { return _current_rowid; }
private:
BitmapIndexReader* _reader;
diff --git a/be/src/olap/rowset/segment_v2/bitshuffle_page.h
b/be/src/olap/rowset/segment_v2/bitshuffle_page.h
index fe7ba566fa..ceadcf6579 100644
--- a/be/src/olap/rowset/segment_v2/bitshuffle_page.h
+++ b/be/src/olap/rowset/segment_v2/bitshuffle_page.h
@@ -331,7 +331,7 @@ public:
Status next_batch(size_t* n, ColumnBlockView* dst) override { return
next_batch<true>(n, dst); }
template <bool forward_index>
- inline Status next_batch(size_t* n, ColumnBlockView* dst) {
+ Status next_batch(size_t* n, ColumnBlockView* dst) {
DCHECK(_parsed);
if (PREDICT_FALSE(*n == 0 || _cur_index >= _num_elements)) {
*n = 0;
diff --git a/be/src/olap/rowset/segment_v2/column_reader.h
b/be/src/olap/rowset/segment_v2/column_reader.h
index e884b6c5bd..3005a4272f 100644
--- a/be/src/olap/rowset/segment_v2/column_reader.h
+++ b/be/src/olap/rowset/segment_v2/column_reader.h
@@ -129,7 +129,7 @@ public:
PagePointer get_dict_page_pointer() const { return _meta.dict_page(); }
- inline bool is_empty() const { return _num_rows == 0; }
+ bool is_empty() const { return _num_rows == 0; }
private:
ColumnReader(const ColumnReaderOptions& opts, const ColumnMetaPB& meta,
uint64_t num_rows,
diff --git a/be/src/olap/rowset/segment_v2/column_writer.h
b/be/src/olap/rowset/segment_v2/column_writer.h
index 08eacbd66f..c5daddc6ce 100644
--- a/be/src/olap/rowset/segment_v2/column_writer.h
+++ b/be/src/olap/rowset/segment_v2/column_writer.h
@@ -161,7 +161,7 @@ public:
Status init() override;
- inline Status append_nulls(size_t num_rows) override;
+ Status append_nulls(size_t num_rows) override;
Status finish_current_page() override;
@@ -275,7 +275,7 @@ public:
Status finish() override;
Status write_data() override;
Status write_ordinal_index() override;
- inline Status append_nulls(size_t num_rows) override;
+ Status append_nulls(size_t num_rows) override;
Status finish_current_page() override;
@@ -302,8 +302,8 @@ public:
private:
Status put_extra_info_in_page(DataPageFooterPB* header) override;
- inline Status write_null_column(size_t num_rows, bool is_null); //
写入num_rows个null标记
- inline bool has_empty_items() const {
+ Status write_null_column(size_t num_rows, bool is_null); //
写入num_rows个null标记
+ bool has_empty_items() const {
return _item_writer->get_next_rowid() == 0;
}
diff --git a/be/src/olap/rowset/segment_v2/index_page.h
b/be/src/olap/rowset/segment_v2/index_page.h
index 614e9b36a7..5d3ecc7487 100644
--- a/be/src/olap/rowset/segment_v2/index_page.h
+++ b/be/src/olap/rowset/segment_v2/index_page.h
@@ -84,23 +84,23 @@ public:
Status parse(const Slice& body, const IndexPageFooterPB& footer);
- inline size_t count() const {
+ size_t count() const {
DCHECK(_parsed);
return _footer.num_entries();
}
- inline bool is_leaf() const {
+ bool is_leaf() const {
DCHECK(_parsed);
return _footer.type() == IndexPageFooterPB::LEAF;
}
- inline const Slice& get_key(int idx) const {
+ const Slice& get_key(int idx) const {
DCHECK(_parsed);
DCHECK(idx >= 0 && idx < _footer.num_entries());
return _keys[idx];
}
- inline const PagePointer& get_value(int idx) const {
+ const PagePointer& get_value(int idx) const {
DCHECK(_parsed);
DCHECK(idx >= 0 && idx < _footer.num_entries());
return _values[idx];
diff --git a/be/src/olap/rowset/segment_v2/plain_page.h
b/be/src/olap/rowset/segment_v2/plain_page.h
index 67881dc165..cd7db008ce 100644
--- a/be/src/olap/rowset/segment_v2/plain_page.h
+++ b/be/src/olap/rowset/segment_v2/plain_page.h
@@ -191,7 +191,7 @@ public:
};
template <bool forward_index>
- inline Status next_batch(size_t* n, ColumnBlockView* dst) {
+ Status next_batch(size_t* n, ColumnBlockView* dst) {
DCHECK(_parsed);
if (PREDICT_FALSE(*n == 0 || _cur_idx >= _num_elems)) {
diff --git a/be/src/olap/selection_vector.h b/be/src/olap/selection_vector.h
index 12df7ffbb7..6896c37a0d 100644
--- a/be/src/olap/selection_vector.h
+++ b/be/src/olap/selection_vector.h
@@ -44,7 +44,7 @@ public:
// Return true if any rows are selected, or false
// This is equivalent to (count_selected() > 0), but faster.
- inline bool any_selected() const;
+ bool any_selected() const;
bool is_row_selected(size_t row) const {
DCHECK_LT(row, _n_rows);
diff --git a/be/src/olap/short_key_index.h b/be/src/olap/short_key_index.h
index 439814f118..86cf67f9f2 100644
--- a/be/src/olap/short_key_index.h
+++ b/be/src/olap/short_key_index.h
@@ -191,7 +191,7 @@ public:
return _ordinal - other._ordinal;
}
- inline bool valid() const;
+ bool valid() const;
Slice operator*() const;
diff --git a/be/src/olap/skiplist.h b/be/src/olap/skiplist.h
index 8d392b4905..c181c9fa64 100644
--- a/be/src/olap/skiplist.h
+++ b/be/src/olap/skiplist.h
@@ -132,7 +132,7 @@ private:
// values are ok.
std::atomic<int> max_height_; // Height of the entire list
- inline int GetMaxHeight() const { return
max_height_.load(std::memory_order_relaxed); }
+ int GetMaxHeight() const { return
max_height_.load(std::memory_order_relaxed); }
// Read/written only by Insert().
Random rnd_;
diff --git a/be/src/olap/stream_index_common.h
b/be/src/olap/stream_index_common.h
index dc4ab1961a..4a9b80cf8c 100644
--- a/be/src/olap/stream_index_common.h
+++ b/be/src/olap/stream_index_common.h
@@ -52,7 +52,7 @@ public:
void reset();
template <typename CellType>
- inline void add(const CellType& cell) {
+ void add(const CellType& cell) {
if (_ignored) {
return;
}
diff --git a/be/src/olap/tablet.h b/be/src/olap/tablet.h
index db1a3b274d..700f7d34f7 100644
--- a/be/src/olap/tablet.h
+++ b/be/src/olap/tablet.h
@@ -59,7 +59,7 @@ public:
const std::string& cumulative_compaction_type = "");
OLAPStatus init();
- inline bool init_succeeded();
+ bool init_succeeded();
bool is_used();
@@ -71,29 +71,29 @@ public:
OLAPStatus revise_tablet_meta(const std::vector<RowsetMetaSharedPtr>&
rowsets_to_clone,
const std::vector<Version>&
versions_to_delete);
- inline const int64_t cumulative_layer_point() const;
- inline void set_cumulative_layer_point(int64_t new_point);
+ const int64_t cumulative_layer_point() const;
+ void set_cumulative_layer_point(int64_t new_point);
- inline size_t tablet_footprint(); // disk space occupied by tablet
- inline size_t num_rows();
- inline int version_count() const;
- inline Version max_version() const;
- inline CumulativeCompactionPolicy* cumulative_compaction_policy();
+ size_t tablet_footprint(); // disk space occupied by tablet
+ size_t num_rows();
+ int version_count() const;
+ Version max_version() const;
+ CumulativeCompactionPolicy* cumulative_compaction_policy();
// properties encapsulated in TabletSchema
- inline KeysType keys_type() const;
- inline SortType sort_type() const;
- inline size_t sort_col_num() const;
- inline size_t num_columns() const;
- inline size_t num_null_columns() const;
- inline size_t num_key_columns() const;
- inline size_t num_short_key_columns() const;
- inline size_t num_rows_per_row_block() const;
- inline CompressKind compress_kind() const;
- inline double bloom_filter_fpp() const;
- inline size_t next_unique_id() const;
- inline size_t row_size() const;
- inline int32_t field_index(const std::string& field_name) const;
+ KeysType keys_type() const;
+ SortType sort_type() const;
+ size_t sort_col_num() const;
+ size_t num_columns() const;
+ size_t num_null_columns() const;
+ size_t num_key_columns() const;
+ size_t num_short_key_columns() const;
+ size_t num_rows_per_row_block() const;
+ CompressKind compress_kind() const;
+ double bloom_filter_fpp() const;
+ size_t next_unique_id() const;
+ size_t row_size() const;
+ int32_t field_index(const std::string& field_name) const;
// operation in rowsets
OLAPStatus add_rowset(RowsetSharedPtr rowset, bool need_persist = true);
@@ -140,14 +140,14 @@ public:
bool version_for_load_deletion(const Version& version);
// meta lock
- inline std::shared_mutex& get_header_lock() { return _meta_lock; }
- inline std::mutex& get_push_lock() { return _ingest_lock; }
- inline std::mutex& get_base_compaction_lock() { return
_base_compaction_lock; }
- inline std::mutex& get_cumulative_compaction_lock() { return
_cumulative_compaction_lock; }
+ std::shared_mutex& get_header_lock() { return _meta_lock; }
+ std::mutex& get_push_lock() { return _ingest_lock; }
+ std::mutex& get_base_compaction_lock() { return _base_compaction_lock; }
+ std::mutex& get_cumulative_compaction_lock() { return
_cumulative_compaction_lock; }
- inline std::shared_mutex& get_migration_lock() { return _migration_lock; }
+ std::shared_mutex& get_migration_lock() { return _migration_lock; }
- inline std::mutex& get_schema_change_lock() { return _schema_change_lock; }
+ std::mutex& get_schema_change_lock() { return _schema_change_lock; }
// operation for compaction
bool can_do_compaction(size_t path_hash, CompactionType compaction_type);
@@ -206,12 +206,12 @@ public:
void calculate_cumulative_point();
// TODO(ygl):
- inline bool is_primary_replica() { return false; }
+ bool is_primary_replica() { return false; }
// TODO(ygl):
// eco mode means power saving in new energy car
// eco mode also means save money in palo
- inline bool in_eco_mode() { return false; }
+ bool in_eco_mode() { return false; }
// return true if the checkpoint is actually done
bool do_tablet_meta_checkpoint();
@@ -250,7 +250,7 @@ public:
return _cumulative_compaction_policy;
}
- inline bool all_beta() const {
+ bool all_beta() const {
ReadLock rdlock(_meta_lock);
return _tablet_meta->all_beta();
}
diff --git a/be/src/olap/tablet_meta.h b/be/src/olap/tablet_meta.h
index e61102d5d0..1f83ccea45 100644
--- a/be/src/olap/tablet_meta.h
+++ b/be/src/olap/tablet_meta.h
@@ -108,36 +108,36 @@ public:
void to_json(std::string* json_string, json2pb::Pb2JsonOptions& options);
uint32_t mem_size() const;
- inline TabletTypePB tablet_type() const { return _tablet_type; }
- inline TabletUid tablet_uid() const;
- inline int64_t table_id() const;
- inline int64_t partition_id() const;
- inline int64_t tablet_id() const;
- inline int32_t schema_hash() const;
- inline int16_t shard_id() const;
- inline void set_shard_id(int32_t shard_id);
- inline int64_t creation_time() const;
- inline void set_creation_time(int64_t creation_time);
- inline int64_t cumulative_layer_point() const;
- inline void set_cumulative_layer_point(int64_t new_point);
-
- inline size_t num_rows() const;
+ TabletTypePB tablet_type() const { return _tablet_type; }
+ TabletUid tablet_uid() const;
+ int64_t table_id() const;
+ int64_t partition_id() const;
+ int64_t tablet_id() const;
+ int32_t schema_hash() const;
+ int16_t shard_id() const;
+ void set_shard_id(int32_t shard_id);
+ int64_t creation_time() const;
+ void set_creation_time(int64_t creation_time);
+ int64_t cumulative_layer_point() const;
+ void set_cumulative_layer_point(int64_t new_point);
+
+ size_t num_rows() const;
// disk space occupied by tablet
- inline size_t tablet_footprint() const;
- inline size_t version_count() const;
+ size_t tablet_footprint() const;
+ size_t version_count() const;
Version max_version() const;
- inline TabletState tablet_state() const;
- inline void set_tablet_state(TabletState state);
+ TabletState tablet_state() const;
+ void set_tablet_state(TabletState state);
- inline bool in_restore_mode() const;
- inline void set_in_restore_mode(bool in_restore_mode);
+ bool in_restore_mode() const;
+ void set_in_restore_mode(bool in_restore_mode);
- inline const TabletSchema& tablet_schema() const;
+ const TabletSchema& tablet_schema() const;
- inline TabletSchema* mutable_tablet_schema();
+ TabletSchema* mutable_tablet_schema();
- inline const std::vector<RowsetMetaSharedPtr>& all_rs_metas() const;
+ const std::vector<RowsetMetaSharedPtr>& all_rs_metas() const;
OLAPStatus add_rs_meta(const RowsetMetaSharedPtr& rs_meta);
void delete_rs_meta_by_version(const Version& version,
std::vector<RowsetMetaSharedPtr>*
deleted_rs_metas);
@@ -148,7 +148,7 @@ public:
bool same_version = false);
void revise_rs_metas(std::vector<RowsetMetaSharedPtr>&& rs_metas);
- inline const std::vector<RowsetMetaSharedPtr>& all_stale_rs_metas() const;
+ const std::vector<RowsetMetaSharedPtr>& all_stale_rs_metas() const;
RowsetMetaSharedPtr acquire_rs_meta_by_version(const Version& version)
const;
void delete_stale_rs_meta_by_version(const Version& version);
RowsetMetaSharedPtr acquire_stale_rs_meta_by_version(const Version&
version) const;
@@ -171,7 +171,7 @@ public:
// used for after tablet cloned to clear stale rowset
void clear_stale_rowset() { _stale_rs_metas.clear(); }
- inline bool all_beta() const;
+ bool all_beta() const;
std::string remote_storage_name() const {
return _remote_storage_name;
diff --git a/be/src/olap/tablet_schema.h b/be/src/olap/tablet_schema.h
index 4408cb4feb..f87a4dd818 100644
--- a/be/src/olap/tablet_schema.h
+++ b/be/src/olap/tablet_schema.h
@@ -40,15 +40,15 @@ public:
void to_schema_pb(ColumnPB* column);
uint32_t mem_size() const;
- inline int32_t unique_id() const { return _unique_id; }
- inline std::string name() const { return _col_name; }
- inline void set_name(std::string col_name) { _col_name = col_name; }
- inline FieldType type() const { return _type; }
- inline bool is_key() const { return _is_key; }
- inline bool is_nullable() const { return _is_nullable; }
- inline bool is_bf_column() const { return _is_bf_column; }
- inline bool has_bitmap_index() const { return _has_bitmap_index; }
- inline bool is_length_variable_type() const {
+ int32_t unique_id() const { return _unique_id; }
+ std::string name() const { return _col_name; }
+ void set_name(std::string col_name) { _col_name = col_name; }
+ FieldType type() const { return _type; }
+ bool is_key() const { return _is_key; }
+ bool is_nullable() const { return _is_nullable; }
+ bool is_bf_column() const { return _is_bf_column; }
+ bool has_bitmap_index() const { return _has_bitmap_index; }
+ bool is_length_variable_type() const {
return _type == OLAP_FIELD_TYPE_CHAR || _type ==
OLAP_FIELD_TYPE_VARCHAR ||
_type == OLAP_FIELD_TYPE_STRING || _type == OLAP_FIELD_TYPE_HLL
||
_type == OLAP_FIELD_TYPE_OBJECT || _type ==
OLAP_FIELD_TYPE_QUANTILE_STATE;
@@ -60,11 +60,11 @@ public:
std::string referenced_column() const { return _referenced_column; }
size_t length() const { return _length; }
size_t index_length() const { return _index_length; }
- inline void set_index_length(size_t index_length) { _index_length =
index_length; }
+ void set_index_length(size_t index_length) { _index_length = index_length;
}
FieldAggregationMethod aggregation() const { return _aggregation; }
int precision() const { return _precision; }
int frac() const { return _frac; }
- inline bool visible() { return _visible; }
+ bool visible() { return _visible; }
// Add a sub column.
void add_sub_column(TabletColumn& sub_column);
@@ -129,23 +129,23 @@ public:
int32_t field_index(const std::string& field_name) const;
const TabletColumn& column(size_t ordinal) const;
const std::vector<TabletColumn>& columns() const;
- inline size_t num_columns() const { return _num_columns; }
- inline size_t num_key_columns() const { return _num_key_columns; }
- inline size_t num_null_columns() const { return _num_null_columns; }
- inline size_t num_short_key_columns() const { return
_num_short_key_columns; }
- inline size_t num_rows_per_row_block() const { return
_num_rows_per_row_block; }
- inline KeysType keys_type() const { return _keys_type; }
- inline SortType sort_type() const { return _sort_type; }
- inline size_t sort_col_num() const { return _sort_col_num; }
- inline CompressKind compress_kind() const { return _compress_kind; }
- inline size_t next_column_unique_id() const { return
_next_column_unique_id; }
- inline double bloom_filter_fpp() const { return _bf_fpp; }
- inline bool is_in_memory() const { return _is_in_memory; }
- inline void set_is_in_memory(bool is_in_memory) { _is_in_memory =
is_in_memory; }
- inline int32_t delete_sign_idx() const { return _delete_sign_idx; }
- inline void set_delete_sign_idx(int32_t delete_sign_idx) {
_delete_sign_idx = delete_sign_idx; }
- inline bool has_sequence_col() const { return _sequence_col_idx != -1; }
- inline int32_t sequence_col_idx() const { return _sequence_col_idx; }
+ size_t num_columns() const { return _num_columns; }
+ size_t num_key_columns() const { return _num_key_columns; }
+ size_t num_null_columns() const { return _num_null_columns; }
+ size_t num_short_key_columns() const { return _num_short_key_columns; }
+ size_t num_rows_per_row_block() const { return _num_rows_per_row_block; }
+ KeysType keys_type() const { return _keys_type; }
+ SortType sort_type() const { return _sort_type; }
+ size_t sort_col_num() const { return _sort_col_num; }
+ CompressKind compress_kind() const { return _compress_kind; }
+ size_t next_column_unique_id() const { return _next_column_unique_id; }
+ double bloom_filter_fpp() const { return _bf_fpp; }
+ bool is_in_memory() const { return _is_in_memory; }
+ void set_is_in_memory(bool is_in_memory) { _is_in_memory = is_in_memory; }
+ int32_t delete_sign_idx() const { return _delete_sign_idx; }
+ void set_delete_sign_idx(int32_t delete_sign_idx) { _delete_sign_idx =
delete_sign_idx; }
+ bool has_sequence_col() const { return _sequence_col_idx != -1; }
+ int32_t sequence_col_idx() const { return _sequence_col_idx; }
vectorized::Block create_block(
const std::vector<uint32_t>& return_columns,
const std::unordered_set<uint32_t>*
tablet_columns_need_convert_null = nullptr) const;
diff --git a/be/src/olap/txn_manager.h b/be/src/olap/txn_manager.h
index 691454b2e8..596b8aab1f 100644
--- a/be/src/olap/txn_manager.h
+++ b/be/src/olap/txn_manager.h
@@ -160,13 +160,13 @@ private:
txn_tablet_map_t;
typedef std::unordered_map<int64_t, std::unordered_set<int64_t>>
txn_partition_map_t;
- inline std::shared_mutex& _get_txn_map_lock(TTransactionId transactionId);
+ std::shared_mutex& _get_txn_map_lock(TTransactionId transactionId);
- inline txn_tablet_map_t& _get_txn_tablet_map(TTransactionId transactionId);
+ txn_tablet_map_t& _get_txn_tablet_map(TTransactionId transactionId);
- inline txn_partition_map_t& _get_txn_partition_map(TTransactionId
transactionId);
+ txn_partition_map_t& _get_txn_partition_map(TTransactionId transactionId);
- inline Mutex& _get_txn_lock(TTransactionId transactionId);
+ Mutex& _get_txn_lock(TTransactionId transactionId);
// Insert or remove (transaction_id, partition_id) from _txn_partition_map
// get _txn_map_lock before calling.
diff --git a/be/src/olap/types.h b/be/src/olap/types.h
index cca6959cec..142c34e6af 100644
--- a/be/src/olap/types.h
+++ b/be/src/olap/types.h
@@ -84,29 +84,29 @@ public:
class ScalarTypeInfo : public TypeInfo {
public:
- inline bool equal(const void* left, const void* right) const override {
+ bool equal(const void* left, const void* right) const override {
return _equal(left, right);
}
- inline int cmp(const void* left, const void* right) const override {
return _cmp(left, right); }
+ int cmp(const void* left, const void* right) const override { return
_cmp(left, right); }
- inline void shallow_copy(void* dest, const void* src) const override {
+ void shallow_copy(void* dest, const void* src) const override {
_shallow_copy(dest, src);
}
- inline void deep_copy(void* dest, const void* src, MemPool* mem_pool)
const override {
+ void deep_copy(void* dest, const void* src, MemPool* mem_pool) const
override {
_deep_copy(dest, src, mem_pool);
}
// See `copy_row_in_memtable()` in olap/row.h, will be removed in the
future.
// It is same with `deep_copy()` for all type except for HLL and OBJECT
type.
- inline void copy_object(void* dest, const void* src, MemPool* mem_pool)
const override {
+ void copy_object(void* dest, const void* src, MemPool* mem_pool) const
override {
_copy_object(dest, src, mem_pool);
}
- inline void direct_copy(void* dest, const void* src) const override {
_direct_copy(dest, src); }
+ void direct_copy(void* dest, const void* src) const override {
_direct_copy(dest, src); }
- inline void direct_copy_may_cut(void* dest, const void* src) const
override {
+ void direct_copy_may_cut(void* dest, const void* src) const override {
_direct_copy_may_cut(dest, src);
}
@@ -122,15 +122,15 @@ public:
std::string to_string(const void* src) const override { return
_to_string(src); }
- inline void set_to_max(void* buf) const override { _set_to_max(buf); }
- inline void set_to_min(void* buf) const override { _set_to_min(buf); }
+ void set_to_max(void* buf) const override { _set_to_max(buf); }
+ void set_to_min(void* buf) const override { _set_to_min(buf); }
- inline uint32_t hash_code(const void* data, uint32_t seed) const override {
+ uint32_t hash_code(const void* data, uint32_t seed) const override {
return _hash_code(data, seed);
}
- inline const size_t size() const override { return _size; }
+ const size_t size() const override { return _size; }
- inline FieldType type() const override { return _field_type; }
+ FieldType type() const override { return _field_type; }
template <typename TypeTraitsClass>
ScalarTypeInfo(TypeTraitsClass t)
@@ -181,7 +181,7 @@ public:
explicit ArrayTypeInfo(const TypeInfo* item_type_info)
: _item_type_info(item_type_info),
_item_size(item_type_info->size()) {}
~ArrayTypeInfo() = default;
- inline bool equal(const void* left, const void* right) const override {
+ bool equal(const void* left, const void* right) const override {
auto l_value = reinterpret_cast<const CollectionValue*>(left);
auto r_value = reinterpret_cast<const CollectionValue*>(right);
if (l_value->length() != r_value->length()) {
@@ -216,7 +216,7 @@ public:
return true;
}
- inline int cmp(const void* left, const void* right) const override {
+ int cmp(const void* left, const void* right) const override {
auto l_value = reinterpret_cast<const CollectionValue*>(left);
auto r_value = reinterpret_cast<const CollectionValue*>(right);
size_t l_length = l_value->length();
@@ -261,13 +261,13 @@ public:
}
}
- inline void shallow_copy(void* dest, const void* src) const override {
+ void shallow_copy(void* dest, const void* src) const override {
auto dest_value = reinterpret_cast<CollectionValue*>(dest);
auto src_value = reinterpret_cast<const CollectionValue*>(src);
dest_value->shallow_copy(src_value);
}
- inline void deep_copy(void* dest, const void* src, MemPool* mem_pool)
const override {
+ void deep_copy(void* dest, const void* src, MemPool* mem_pool) const
override {
auto dest_value = reinterpret_cast<CollectionValue*>(dest);
auto src_value = reinterpret_cast<const CollectionValue*>(src);
@@ -300,18 +300,18 @@ public:
}
}
- inline void copy_object(void* dest, const void* src, MemPool* mem_pool)
const override {
+ void copy_object(void* dest, const void* src, MemPool* mem_pool) const
override {
deep_copy(dest, src, mem_pool);
}
- inline void direct_copy(void* dest, const void* src) const override {
+ void direct_copy(void* dest, const void* src) const override {
auto dest_value = reinterpret_cast<CollectionValue*>(dest);
// NOTICE: The address pointed by null_signs of the dest_value can NOT
be modified here.
auto base =
reinterpret_cast<uint8_t*>(dest_value->mutable_null_signs());
direct_copy(&base, dest, src);
}
- inline void direct_copy(uint8_t** base, void* dest, const void* src) const
{
+ void direct_copy(uint8_t** base, void* dest, const void* src) const {
auto dest_value = reinterpret_cast<CollectionValue*>(dest);
auto src_value = reinterpret_cast<const CollectionValue*>(src);
@@ -351,7 +351,7 @@ public:
}
}
- inline void direct_copy_may_cut(void* dest, const void* src) const
override {
+ void direct_copy_may_cut(void* dest, const void* src) const override {
direct_copy(dest, src);
}
@@ -380,15 +380,15 @@ public:
return result;
}
- inline void set_to_max(void* buf) const override {
+ void set_to_max(void* buf) const override {
DCHECK(false) << "set_to_max of list is not implemented.";
}
- inline void set_to_min(void* buf) const override {
+ void set_to_min(void* buf) const override {
DCHECK(false) << "set_to_min of list is not implemented.";
}
- inline uint32_t hash_code(const void* data, uint32_t seed) const override {
+ uint32_t hash_code(const void* data, uint32_t seed) const override {
auto value = reinterpret_cast<const CollectionValue*>(data);
auto len = value->length();
uint32_t result = HashUtil::hash(&len, sizeof(len), seed);
@@ -403,11 +403,11 @@ public:
return result;
}
- inline const size_t size() const override { return
sizeof(CollectionValue); }
+ const size_t size() const override { return sizeof(CollectionValue); }
- inline FieldType type() const override { return OLAP_FIELD_TYPE_ARRAY; }
+ FieldType type() const override { return OLAP_FIELD_TYPE_ARRAY; }
- inline const TypeInfo* item_type_info() const { return _item_type_info; }
+ const TypeInfo* item_type_info() const { return _item_type_info; }
private:
const TypeInfo* _item_type_info;
diff --git a/be/src/runtime/buffered_tuple_stream3.h
b/be/src/runtime/buffered_tuple_stream3.h
index 312798326e..b535caced8 100644
--- a/be/src/runtime/buffered_tuple_stream3.h
+++ b/be/src/runtime/buffered_tuple_stream3.h
@@ -376,9 +376,9 @@ private:
struct Page {
Page() : num_rows(0), retrieved_buffer(true) {}
- inline int len() const { return handle.len(); }
- inline bool is_pinned() const { return handle.is_pinned(); }
- inline int pin_count() const { return handle.pin_count(); }
+ int len() const { return handle.len(); }
+ bool is_pinned() const { return handle.is_pinned(); }
+ int pin_count() const { return handle.pin_count(); }
Status GetBuffer(const BufferPool::BufferHandle** buffer) {
RETURN_IF_ERROR(handle.GetBuffer(buffer));
retrieved_buffer = true;
diff --git a/be/src/runtime/bufferpool/buffer_pool.h
b/be/src/runtime/bufferpool/buffer_pool.h
index 92a488eeea..83aef1fdcb 100644
--- a/be/src/runtime/bufferpool/buffer_pool.h
+++ b/be/src/runtime/bufferpool/buffer_pool.h
@@ -413,11 +413,11 @@ public:
/// Allow move construction of handles to support std::move(). Inline to
make moving
/// efficient.
- inline BufferHandle(BufferHandle&& src);
+ BufferHandle(BufferHandle&& src);
/// Allow move assignment of handles to support STL classes like
std::vector.
/// Destination must be uninitialized. Inline to make moving efficient.
- inline BufferHandle& operator=(BufferHandle&& src);
+ BufferHandle& operator=(BufferHandle&& src);
bool is_open() const { return data_ != nullptr; }
int64_t len() const {
@@ -452,7 +452,7 @@ private:
/// Internal helper to reset the handle to an unopened state. Inlined to
make moving
/// efficient.
- inline void Reset();
+ void Reset();
/// The client the buffer handle belongs to, used to validate that the
correct client
/// is provided in BufferPool method calls. Set to nullptr if the buffer
is in a free list.
diff --git a/be/src/runtime/bufferpool/free_list.h
b/be/src/runtime/bufferpool/free_list.h
index 2bde0bdd68..d373b03678 100644
--- a/be/src/runtime/bufferpool/free_list.h
+++ b/be/src/runtime/bufferpool/free_list.h
@@ -99,13 +99,13 @@ private:
DISALLOW_COPY_AND_ASSIGN(FreeList);
/// Compare function that orders by memory address.
- inline static bool SortCompare(const BufferHandle& b1, const BufferHandle&
b2) {
+ static bool SortCompare(const BufferHandle& b1, const BufferHandle& b2) {
return b1.data() < b2.data();
}
/// Compare function that orders by memory address. Needs to be inverse of
SortCompare()
/// because C++ provides a max-heap.
- inline static bool HeapCompare(const BufferHandle& b1, const BufferHandle&
b2) {
+ static bool HeapCompare(const BufferHandle& b1, const BufferHandle& b2) {
return SortCompare(b2, b1);
}
diff --git a/be/src/runtime/bufferpool/reservation_tracker.h
b/be/src/runtime/bufferpool/reservation_tracker.h
index df81b9e9e5..997c16e51e 100644
--- a/be/src/runtime/bufferpool/reservation_tracker.h
+++ b/be/src/runtime/bufferpool/reservation_tracker.h
@@ -173,7 +173,7 @@ public:
private:
/// Returns the amount of 'reservation_' that is unused.
- inline int64_t unused_reservation() const {
+ int64_t unused_reservation() const {
return reservation_ - used_reservation_ - child_reservations_;
}
diff --git a/be/src/runtime/cache/cache_utils.h
b/be/src/runtime/cache/cache_utils.h
index ea413ff4da..c2d33db9c8 100644
--- a/be/src/runtime/cache/cache_utils.h
+++ b/be/src/runtime/cache/cache_utils.h
@@ -49,7 +49,7 @@ struct CacheStat {
uint32 read_count;
CacheStat() { init(); }
- inline long cache_time_second() {
+ long cache_time_second() {
struct timeval tv;
gettimeofday(&tv, nullptr);
return tv.tv_sec;
diff --git a/be/src/runtime/collection_value.h
b/be/src/runtime/collection_value.h
index 6050c78451..7aa14a955f 100644
--- a/be/src/runtime/collection_value.h
+++ b/be/src/runtime/collection_value.h
@@ -59,15 +59,15 @@ public:
CollectionValue(void* data, uint32_t length, bool has_null, bool*
null_signs)
: _data(data), _length(length), _has_null(has_null),
_null_signs(null_signs) {}
- inline bool is_null_at(uint32_t index) const {
+ bool is_null_at(uint32_t index) const {
return this->_has_null && this->_null_signs[index];
}
void to_collection_val(CollectionVal* val) const;
- inline uint32_t size() const { return _length; }
+ uint32_t size() const { return _length; }
- inline uint32_t length() const { return _length; }
+ uint32_t length() const { return _length; }
void shallow_copy(const CollectionValue* other);
@@ -121,15 +121,15 @@ public:
const char* tuple_data,
const TypeDescriptor& type);
- inline const void* data() const { return _data; }
- inline bool has_null() const { return _has_null; }
- inline const bool* null_signs() const { return _null_signs; }
- inline void* mutable_data() { return _data; }
- inline bool* mutable_null_signs() { return _null_signs; }
- inline void set_length(uint32_t length) { _length = length; }
- inline void set_has_null(bool has_null) { _has_null = has_null; }
- inline void set_data(void* data) { _data = data; }
- inline void set_null_signs(bool* null_signs) { _null_signs = null_signs; }
+ const void* data() const { return _data; }
+ bool has_null() const { return _has_null; }
+ const bool* null_signs() const { return _null_signs; }
+ void* mutable_data() { return _data; }
+ bool* mutable_null_signs() { return _null_signs; }
+ void set_length(uint32_t length) { _length = length; }
+ void set_has_null(bool has_null) { _has_null = has_null; }
+ void set_data(void* data) { _data = data; }
+ void set_null_signs(bool* null_signs) { _null_signs = null_signs; }
public:
// child column data
diff --git a/be/src/runtime/data_stream_mgr.h b/be/src/runtime/data_stream_mgr.h
index e627de1727..f579d31b9e 100644
--- a/be/src/runtime/data_stream_mgr.h
+++ b/be/src/runtime/data_stream_mgr.h
@@ -129,7 +129,7 @@ private:
// Remove receiver block for fragment_instance_id/node_id from the map.
Status deregister_recvr(const TUniqueId& fragment_instance_id, PlanNodeId
node_id);
- inline uint32_t get_hash_value(const TUniqueId& fragment_instance_id,
PlanNodeId node_id);
+ uint32_t get_hash_value(const TUniqueId& fragment_instance_id, PlanNodeId
node_id);
};
} // namespace doris
diff --git a/be/src/runtime/data_stream_sender.h
b/be/src/runtime/data_stream_sender.h
index 1da9d32026..95028e46cf 100644
--- a/be/src/runtime/data_stream_sender.h
+++ b/be/src/runtime/data_stream_sender.h
@@ -159,7 +159,7 @@ protected:
bool is_local() { return _is_local; }
- inline Status _wait_last_brpc() {
+ Status _wait_last_brpc() {
if (_closure == nullptr) return Status::OK();
auto cntl = &_closure->cntl;
brpc::Join(cntl->call_id());
diff --git a/be/src/runtime/datetime_value.h b/be/src/runtime/datetime_value.h
index 4f3a310e48..6ae858f0da 100644
--- a/be/src/runtime/datetime_value.h
+++ b/be/src/runtime/datetime_value.h
@@ -357,7 +357,7 @@ public:
return true;
};
- inline uint64_t daynr() const { return calc_daynr(_year, _month, _day); }
+ uint64_t daynr() const { return calc_daynr(_year, _month, _day); }
// Calculate how many days since 0000-01-01
// 0000-01-01 is 1st B.C.
@@ -399,8 +399,8 @@ public:
void to_datetime() { _type = TIME_DATETIME; }
// Weekday, from 0(Mon) to 6(Sun)
- inline uint8_t weekday() const { return calc_weekday(daynr(), false); }
- inline auto day_of_week() const { return (weekday() + 1) % 7 + 1; }
+ uint8_t weekday() const { return calc_weekday(daynr(), false); }
+ auto day_of_week() const { return (weekday() + 1) % 7 + 1; }
// The bits in week_format has the following meaning:
// WEEK_MONDAY_FIRST (0)
diff --git a/be/src/runtime/decimalv2_value.h b/be/src/runtime/decimalv2_value.h
index b2729ac5af..4d0e69fd01 100644
--- a/be/src/runtime/decimalv2_value.h
+++ b/be/src/runtime/decimalv2_value.h
@@ -77,8 +77,8 @@ public:
static_cast<int128_t>(MAX_INT64) * ONE_BILLION + MAX_FRAC_VALUE;
DecimalV2Value() = default;
- inline const int128_t& value() const { return _value; }
- inline int128_t& value() { return _value; }
+ const int128_t& value() const { return _value; }
+ int128_t& value() { return _value; }
DecimalV2Value(const std::string& decimal_str) {
parse_from_str(decimal_str.c_str(), decimal_str.size());
@@ -92,7 +92,7 @@ public:
from_olap_decimal(int_value, frac_value);
}
- inline bool from_olap_decimal(int64_t int_value, int64_t frac_value) {
+ bool from_olap_decimal(int64_t int_value, int64_t frac_value) {
bool success = true;
bool is_negative = (int_value < 0 || frac_value < 0);
if (is_negative) {
diff --git a/be/src/runtime/disk_io_mgr_internal.h
b/be/src/runtime/disk_io_mgr_internal.h
index 078bef849a..ee3971a53c 100644
--- a/be/src/runtime/disk_io_mgr_internal.h
+++ b/be/src/runtime/disk_io_mgr_internal.h
@@ -52,7 +52,7 @@ struct DiskIoMgr::DiskQueue {
std::list<RequestContext*> request_contexts;
// Enqueue the request context to the disk queue. The DiskQueue lock must
not be taken.
- inline void enqueue_context(RequestContext* worker) {
+ void enqueue_context(RequestContext* worker) {
{
std::unique_lock<std::mutex> disk_lock(lock);
// Check that the reader is not already on the queue
diff --git a/be/src/runtime/mem_tracker.h b/be/src/runtime/mem_tracker.h
index 9ae3ab906a..38f3463640 100644
--- a/be/src/runtime/mem_tracker.h
+++ b/be/src/runtime/mem_tracker.h
@@ -95,7 +95,7 @@ public:
static std::shared_ptr<MemTracker> get_process_tracker();
static MemTracker* get_raw_process_tracker();
- inline Status check_sys_mem_info(int64_t bytes) {
+ Status check_sys_mem_info(int64_t bytes) {
if (MemInfo::initialized() && MemInfo::current_mem() + bytes >=
MemInfo::mem_limit()) {
return Status::MemoryLimitExceeded(fmt::format(
"{}: TryConsume failed, bytes={} process whole
consumption={} mem limit={}",
diff --git a/be/src/runtime/spill_sorter.cc b/be/src/runtime/spill_sorter.cc
index fc9213501e..efd0692585 100644
--- a/be/src/runtime/spill_sorter.cc
+++ b/be/src/runtime/spill_sorter.cc
@@ -164,7 +164,7 @@ private:
const vector<StringValue*>&
var_values);
// Returns true if we have var-len slots and there are var-len blocks.
- inline bool has_var_len_blocks() const {
+ bool has_var_len_blocks() const {
return _has_var_len_slots && !_var_len_blocks.empty();
}
diff --git a/be/src/runtime/string_value.h b/be/src/runtime/string_value.h
index cdf33ab57e..1a0f0c34ec 100644
--- a/be/src/runtime/string_value.h
+++ b/be/src/runtime/string_value.h
@@ -105,7 +105,7 @@ struct StringValue {
// this < other: -1
// this == other: 0
// this > other: 1
- inline int compare(const StringValue& other) const {
+ int compare(const StringValue& other) const {
int l = std::min(len, other.len);
if (l == 0) {
@@ -123,7 +123,7 @@ struct StringValue {
}
// ==
- inline bool eq(const StringValue& other) const {
+ bool eq(const StringValue& other) const {
if (this->len != other.len) {
return false;
}
diff --git a/be/src/runtime/thread_mem_tracker_mgr.h
b/be/src/runtime/thread_mem_tracker_mgr.h
index 0066dc0519..a709a536bf 100644
--- a/be/src/runtime/thread_mem_tracker_mgr.h
+++ b/be/src/runtime/thread_mem_tracker_mgr.h
@@ -108,7 +108,7 @@ public:
_mem_tracker_labels[_temp_tracker_id] = mem_tracker->label();
}
- inline ConsumeErrCallBackInfo update_consume_err_cb(const std::string&
cancel_msg,
+ ConsumeErrCallBackInfo update_consume_err_cb(const std::string& cancel_msg,
bool cancel_task,
ERRCALLBACK cb_func) {
_temp_consume_err_cb = _consume_err_cb;
_consume_err_cb.cancel_msg = cancel_msg;
@@ -117,7 +117,7 @@ public:
return _temp_consume_err_cb;
}
- inline void update_consume_err_cb(const ConsumeErrCallBackInfo&
consume_err_cb) {
+ void update_consume_err_cb(const ConsumeErrCallBackInfo& consume_err_cb) {
_consume_err_cb = consume_err_cb;
}
diff --git a/be/src/runtime/types.h b/be/src/runtime/types.h
index 53532dfbd8..aaa937b3b9 100644
--- a/be/src/runtime/types.h
+++ b/be/src/runtime/types.h
@@ -162,30 +162,30 @@ struct TypeDescriptor {
void to_protobuf(PTypeDesc* ptype) const;
- inline bool is_string_type() const {
+ bool is_string_type() const {
return type == TYPE_VARCHAR || type == TYPE_CHAR || type == TYPE_HLL ||
type == TYPE_OBJECT || type == TYPE_QUANTILE_STATE || type ==
TYPE_STRING;
}
- inline bool is_date_type() const { return type == TYPE_DATE || type ==
TYPE_DATETIME; }
+ bool is_date_type() const { return type == TYPE_DATE || type ==
TYPE_DATETIME; }
- inline bool is_decimal_type() const { return (type == TYPE_DECIMALV2); }
+ bool is_decimal_type() const { return (type == TYPE_DECIMALV2); }
- inline bool is_datetime_type() const { return type == TYPE_DATETIME; }
+ bool is_datetime_type() const { return type == TYPE_DATETIME; }
- inline bool is_var_len_string_type() const {
+ bool is_var_len_string_type() const {
return type == TYPE_VARCHAR || type == TYPE_HLL || type == TYPE_CHAR ||
type == TYPE_OBJECT || type == TYPE_QUANTILE_STATE || type ==
TYPE_STRING;
}
- inline bool is_complex_type() const {
+ bool is_complex_type() const {
return type == TYPE_STRUCT || type == TYPE_ARRAY || type == TYPE_MAP;
}
- inline bool is_collection_type() const { return type == TYPE_ARRAY || type
== TYPE_MAP; }
+ bool is_collection_type() const { return type == TYPE_ARRAY || type ==
TYPE_MAP; }
/// Returns the byte size of this type. Returns 0 for variable length
types.
- inline int get_byte_size() const {
+ int get_byte_size() const {
switch (type) {
case TYPE_ARRAY:
case TYPE_MAP:
@@ -226,7 +226,7 @@ struct TypeDescriptor {
}
/// Returns the size of a slot for this type.
- inline int get_slot_size() const {
+ int get_slot_size() const {
switch (type) {
case TYPE_CHAR:
case TYPE_VARCHAR:
diff --git a/be/src/runtime/vectorized_row_batch.h
b/be/src/runtime/vectorized_row_batch.h
index 6819f01c6a..aff39c71c3 100644
--- a/be/src/runtime/vectorized_row_batch.h
+++ b/be/src/runtime/vectorized_row_batch.h
@@ -85,7 +85,7 @@ public:
_size = size;
}
- inline int num_rows() { return _size; }
+ int num_rows() { return _size; }
bool selected_in_use() const { return _selected_in_use; }
@@ -93,7 +93,7 @@ public:
uint16_t* selected() const { return _selected; }
- inline void clear() {
+ void clear() {
_size = 0;
_selected_in_use = false;
_limit = _capacity;
diff --git a/be/src/util/brpc_client_cache.h b/be/src/util/brpc_client_cache.h
index b15a3c6aeb..f268a69243 100644
--- a/be/src/util/brpc_client_cache.h
+++ b/be/src/util/brpc_client_cache.h
@@ -42,28 +42,28 @@ public:
BrpcClientCache();
virtual ~BrpcClientCache();
- inline std::shared_ptr<T> get_client(const butil::EndPoint& endpoint) {
+ std::shared_ptr<T> get_client(const butil::EndPoint& endpoint) {
return get_client(butil::endpoint2str(endpoint).c_str());
}
#ifdef BE_TEST
- virtual inline std::shared_ptr<T> get_client(const TNetworkAddress& taddr)
{
+ virtual std::shared_ptr<T> get_client(const TNetworkAddress& taddr) {
std::string host_port = fmt::format("{}:{}", taddr.hostname,
taddr.port);
return get_client(host_port);
}
#else
- inline std::shared_ptr<T> get_client(const TNetworkAddress& taddr) {
+ std::shared_ptr<T> get_client(const TNetworkAddress& taddr) {
std::string host_port = fmt::format("{}:{}", taddr.hostname,
taddr.port);
return get_client(host_port);
}
#endif
- inline std::shared_ptr<T> get_client(const std::string& host, int port) {
+ std::shared_ptr<T> get_client(const std::string& host, int port) {
std::string host_port = fmt::format("{}:{}", host, port);
return get_client(host_port);
}
- inline std::shared_ptr<T> get_client(const std::string& host_port) {
+ std::shared_ptr<T> get_client(const std::string& host_port) {
std::shared_ptr<T> stub_ptr;
auto get_value = [&stub_ptr](typename StubMap<T>::mapped_type& v) {
stub_ptr = v; };
if(LIKELY(_stub_map.if_contains(host_port, get_value))) {
@@ -94,36 +94,36 @@ public:
return stub;
}
- inline size_t size() { return _stub_map.size(); }
+ size_t size() { return _stub_map.size(); }
- inline void clear() { _stub_map.clear(); }
+ void clear() { _stub_map.clear(); }
- inline size_t erase(const std::string& host_port) { return
_stub_map.erase(host_port); }
+ size_t erase(const std::string& host_port) { return
_stub_map.erase(host_port); }
size_t erase(const std::string& host, int port) {
std::string host_port = fmt::format("{}:{}", host, port);
return erase(host_port);
}
- inline size_t erase(const butil::EndPoint& endpoint) {
+ size_t erase(const butil::EndPoint& endpoint) {
return _stub_map.erase(butil::endpoint2str(endpoint).c_str());
}
- inline bool exist(const std::string& host_port) {
+ bool exist(const std::string& host_port) {
return _stub_map.find(host_port) != _stub_map.end();
}
- inline void get_all(std::vector<std::string>* endpoints) {
+ void get_all(std::vector<std::string>* endpoints) {
for (auto it = _stub_map.begin(); it != _stub_map.end(); ++it) {
endpoints->emplace_back(it->first.c_str());
}
}
- inline bool available(std::shared_ptr<T> stub, const butil::EndPoint&
endpoint) {
+ bool available(std::shared_ptr<T> stub, const butil::EndPoint& endpoint) {
return available(stub, butil::endpoint2str(endpoint).c_str());
}
- inline bool available(std::shared_ptr<T> stub, const std::string&
host_port) {
+ bool available(std::shared_ptr<T> stub, const std::string& host_port) {
if (!stub) {
LOG(WARNING) << "stub is null to: " << host_port;
return false;
@@ -148,7 +148,7 @@ public:
}
}
- inline bool available(std::shared_ptr<T> stub, const std::string& host,
int port) {
+ bool available(std::shared_ptr<T> stub, const std::string& host, int port)
{
std::string host_port = fmt::format("{}:{}", host, port);
return available(stub, host_port);
}
diff --git a/be/src/util/buffer_builder.hpp b/be/src/util/buffer_builder.hpp
index 710b1e2c4c..5e56dd1951 100644
--- a/be/src/util/buffer_builder.hpp
+++ b/be/src/util/buffer_builder.hpp
@@ -34,14 +34,14 @@ public:
~BufferBuilder() {}
- inline void append(const void* buffer, int len) {
+ void append(const void* buffer, int len) {
DCHECK_LE(_size + len, _capacity);
memcpy(_buffer + _size, buffer, len);
_size += len;
}
template <typename T>
- inline void append(const T& v) {
+ void append(const T& v) {
append(&v, sizeof(T));
}
diff --git a/be/src/util/core_local.h b/be/src/util/core_local.h
index 147bf0e195..4a36bd0e6b 100644
--- a/be/src/util/core_local.h
+++ b/be/src/util/core_local.h
@@ -122,15 +122,15 @@ public:
CoreLocalValueController<T>::instance()->reclaim_id(_id);
}
- inline size_t size() const { return _size; }
- inline T* access() const {
+ size_t size() const { return _size; }
+ T* access() const {
size_t cpu_id = sched_getcpu();
if (cpu_id >= _size) {
cpu_id &= _size - 1;
}
return access_at_core(cpu_id);
}
- inline T* access_at_core(size_t core_idx) const { return
_values[core_idx]; }
+ T* access_at_core(size_t core_idx) const { return _values[core_idx]; }
private:
int _id = -1;
diff --git a/be/src/util/frame_of_reference_coding.h
b/be/src/util/frame_of_reference_coding.h
index 961256ac06..d9fdaaec8b 100644
--- a/be/src/util/frame_of_reference_coding.h
+++ b/be/src/util/frame_of_reference_coding.h
@@ -151,7 +151,7 @@ public:
private:
void bit_unpack(const uint8_t* input, uint8_t in_num, int bit_width, T*
output);
- inline uint32_t frame_size(uint32_t frame_index) {
+ uint32_t frame_size(uint32_t frame_index) {
return (frame_index == _frame_count - 1) ? _last_frame_size :
_max_frame_size;
}
diff --git a/be/src/util/histogram.h b/be/src/util/histogram.h
index 0a7ea47726..bd81b2bfc7 100644
--- a/be/src/util/histogram.h
+++ b/be/src/util/histogram.h
@@ -81,14 +81,14 @@ struct HistogramStat {
void add(const uint64_t& value);
void merge(const HistogramStat& other);
- inline uint64_t min() const { return _min.load(std::memory_order_relaxed);
}
- inline uint64_t max() const { return _max.load(std::memory_order_relaxed);
}
- inline uint64_t num() const { return _num.load(std::memory_order_relaxed);
}
- inline uint64_t sum() const { return _sum.load(std::memory_order_relaxed);
}
- inline uint64_t sum_squares() const {
+ uint64_t min() const { return _min.load(std::memory_order_relaxed); }
+ uint64_t max() const { return _max.load(std::memory_order_relaxed); }
+ uint64_t num() const { return _num.load(std::memory_order_relaxed); }
+ uint64_t sum() const { return _sum.load(std::memory_order_relaxed); }
+ uint64_t sum_squares() const {
return _sum_squares.load(std::memory_order_relaxed);
}
- inline uint64_t bucket_at(size_t b) const {
+ uint64_t bucket_at(size_t b) const {
return _buckets[b].load(std::memory_order_relaxed);
}
diff --git a/be/src/util/logging.h b/be/src/util/logging.h
index 1168267cdc..506ddd1c78 100644
--- a/be/src/util/logging.h
+++ b/be/src/util/logging.h
@@ -122,12 +122,12 @@ public:
return *this;
}
- inline TaggableLogger& tag(const std::string& key, const std::string&
value) {
+ TaggableLogger& tag(const std::string& key, const std::string& value) {
_tags = new Tags(key, value, _tags);
return *this;
}
- inline TaggableLogger& tag(const std::string& key, std::string&& value) {
+ TaggableLogger& tag(const std::string& key, std::string&& value) {
_tags = new Tags(key, std::move(value), _tags);
return *this;
}
diff --git a/be/src/util/mutex.h b/be/src/util/mutex.h
index efe8bf0cd2..86b6e81e59 100644
--- a/be/src/util/mutex.h
+++ b/be/src/util/mutex.h
@@ -84,7 +84,7 @@ public:
_locked = false;
}
- inline bool own_lock() const { return _locked; }
+ bool own_lock() const { return _locked; }
private:
Mutex* _mutex;
diff --git a/be/src/util/s3_uri.h b/be/src/util/s3_uri.h
index be8579c320..162e45ea12 100644
--- a/be/src/util/s3_uri.h
+++ b/be/src/util/s3_uri.h
@@ -28,10 +28,10 @@ class S3URI {
public:
S3URI(const std::string& location) : _location(location) {}
bool parse();
- inline const std::string& get_bucket() const { return _bucket; }
- inline const std::string& get_key() const { return _key; }
- inline const std::string& get_location() const { return _location; }
- inline const std::string& get_scheme() const { return _scheme; }
+ const std::string& get_bucket() const { return _bucket; }
+ const std::string& get_key() const { return _key; }
+ const std::string& get_location() const { return _location; }
+ const std::string& get_scheme() const { return _scheme; }
private:
static const std::string _SCHEME_DELIM;
diff --git a/be/src/util/spinlock.h b/be/src/util/spinlock.h
index 577b10bbd5..7ecf322392 100644
--- a/be/src/util/spinlock.h
+++ b/be/src/util/spinlock.h
@@ -50,7 +50,7 @@ public:
void unlock() { _locked.clear(std::memory_order_release); }
// Tries to acquire the lock
- inline bool try_lock() { return
!_locked.test_and_set(std::memory_order_acquire); }
+ bool try_lock() { return !_locked.test_and_set(std::memory_order_acquire);
}
private:
static const int NUM_SPIN_CYCLES = 70;
diff --git a/be/src/util/tdigest.h b/be/src/util/tdigest.h
index 28569bf0a9..2955a50f94 100644
--- a/be/src/util/tdigest.h
+++ b/be/src/util/tdigest.h
@@ -71,15 +71,15 @@ public:
Centroid(Value mean, Weight weight) : _mean(mean), _weight(weight) {}
- inline Value mean() const noexcept { return _mean; }
+ Value mean() const noexcept { return _mean; }
- inline Weight weight() const noexcept { return _weight; }
+ Weight weight() const noexcept { return _weight; }
- inline Value& mean() noexcept { return _mean; }
+ Value& mean() noexcept { return _mean; }
- inline Weight& weight() noexcept { return _weight; }
+ Weight& weight() noexcept { return _weight; }
- inline void add(const Centroid& c) {
+ void add(const Centroid& c) {
DCHECK_GT(c._weight, 0);
if (_weight != 0.0) {
_weight += c._weight;
@@ -210,7 +210,7 @@ public:
}
// merge in another t-digest
- inline void merge(const TDigest* other) {
+ void merge(const TDigest* other) {
std::vector<const TDigest*> others {other};
add(others.cbegin(), others.cend());
}
@@ -223,7 +223,7 @@ public:
Index maxProcessed() const { return _max_processed; }
- inline void add(std::vector<const TDigest*> digests) {
add(digests.cbegin(), digests.cend()); }
+ void add(std::vector<const TDigest*> digests) { add(digests.cbegin(),
digests.cend()); }
// merge in a vector of tdigests in the most efficient manner possible
// in constant space
@@ -415,11 +415,11 @@ public:
void add(Value x) { add(x, 1); }
- inline void compress() { process(); }
+ void compress() { process(); }
// add a single centroid to the unprocessed vector, processing previously
unprocessed sorted if our limit has
// been reached.
- inline bool add(Value x, Weight w) {
+ bool add(Value x, Weight w) {
if (std::isnan(x)) {
return false;
}
@@ -429,7 +429,7 @@ public:
return true;
}
- inline void add(std::vector<Centroid>::const_iterator iter,
+ void add(std::vector<Centroid>::const_iterator iter,
std::vector<Centroid>::const_iterator end) {
while (iter != end) {
const size_t diff = std::distance(iter, end);
@@ -561,10 +561,10 @@ private:
std::vector<Weight> _cumulative;
// return mean of i-th centroid
- inline Value mean(int i) const noexcept { return _processed[i].mean(); }
+ Value mean(int i) const noexcept { return _processed[i].mean(); }
// return weight of i-th centroid
- inline Weight weight(int i) const noexcept { return
_processed[i].weight(); }
+ Weight weight(int i) const noexcept { return _processed[i].weight(); }
// append all unprocessed centroids into current unprocessed vector
void mergeUnprocessed(const std::vector<const TDigest*>& tdigests) {
@@ -622,7 +622,7 @@ private:
}
}
- inline void processIfNecessary() {
+ void processIfNecessary() {
if (isDirty()) {
process();
}
@@ -644,7 +644,7 @@ private:
// merges _unprocessed centroids and _processed centroids together and
processes them
// when complete, _unprocessed will be empty and _processed will have at
most _max_processed centroids
- inline void process() {
+ void process() {
CentroidComparator cc;
RadixSort<TDigestRadixSortTraits>::executeLSD(_unprocessed.data(),
_unprocessed.size());
auto count = _unprocessed.size();
@@ -682,7 +682,7 @@ private:
updateCumulative();
}
- inline int checkWeights() { return checkWeights(_processed,
_processed_weight); }
+ int checkWeights() { return checkWeights(_processed, _processed_weight); }
size_t checkWeights(const std::vector<Centroid>& sorted, Value total) {
size_t badWeight = 0;
@@ -728,11 +728,11 @@ private:
* @param q The quantile scale value to be mapped.
* @return The centroid scale value corresponding to q.
*/
- inline Value integratedLocation(Value q) const {
+ Value integratedLocation(Value q) const {
return _compression * (std::asin(2.0 * q - 1.0) + M_PI / 2) / M_PI;
}
- inline Value integratedQ(Value k) const {
+ Value integratedQ(Value k) const {
return (std::sin(std::min(k, _compression) * M_PI / _compression -
M_PI / 2) + 1) / 2;
}
diff --git a/be/src/util/tuple_row_zorder_compare.cpp
b/be/src/util/tuple_row_zorder_compare.cpp
index 6697b3c25b..cd27c6b5cf 100644
--- a/be/src/util/tuple_row_zorder_compare.cpp
+++ b/be/src/util/tuple_row_zorder_compare.cpp
@@ -151,14 +151,14 @@ namespace doris {
}
template<typename U, typename T>
- U inline TupleRowZOrderComparator::get_shared_int_representation(const T
val, U mask) const {
+ U TupleRowZOrderComparator::get_shared_int_representation(const T val, U
mask) const {
uint64_t shift_size = static_cast<uint64_t>(
std::max(static_cast<int64_t>((sizeof(U) - sizeof(T)) * 8),
(int64_t) 0));
return (static_cast<U>(val) << shift_size) ^ mask;
}
template<typename U, typename T>
- U inline TupleRowZOrderComparator::get_shared_float_representation(const
void *val, U mask) const {
+ U TupleRowZOrderComparator::get_shared_float_representation(const void
*val, U mask) const {
int64_t tmp;
T floating_value = *reinterpret_cast<const T *>(val);
memcpy(&tmp, &floating_value, sizeof(T));
@@ -175,7 +175,7 @@ namespace doris {
}
template<typename U>
- U inline TupleRowZOrderComparator::get_shared_string_representation(const
char *char_ptr,
+ U TupleRowZOrderComparator::get_shared_string_representation(const char
*char_ptr,
int length) const {
int len = length < sizeof(U) ? length : sizeof(U);
if (len == 0) return 0;
diff --git a/be/src/util/tuple_row_zorder_compare.h
b/be/src/util/tuple_row_zorder_compare.h
index 043493bfd2..2c7c3420dc 100644
--- a/be/src/util/tuple_row_zorder_compare.h
+++ b/be/src/util/tuple_row_zorder_compare.h
@@ -58,11 +58,11 @@ public:
template <typename U>
U get_shared_representation(const void* val, FieldType type) const;
template <typename U, typename T>
- U inline get_shared_int_representation(const T val, U mask) const;
+ U get_shared_int_representation(const T val, U mask) const;
template <typename U, typename T>
- U inline get_shared_float_representation(const void* val, U mask) const;
+ U get_shared_float_representation(const void* val, U mask) const;
template <typename U>
- U inline get_shared_string_representation(const char* char_ptr, int
length) const;
+ U get_shared_string_representation(const char* char_ptr, int length) const;
virtual int operator()(const char* lhs, const char* rhs) const;
int get_type_byte_size(FieldType type) const;
};
diff --git a/be/src/vec/columns/column_dictionary.h
b/be/src/vec/columns/column_dictionary.h
index 76f9516c9c..dab8d81ee3 100644
--- a/be/src/vec/columns/column_dictionary.h
+++ b/be/src/vec/columns/column_dictionary.h
@@ -284,12 +284,12 @@ public:
_inverted_index.reserve(n);
}
- inline void insert_value(StringValue& value) {
+ void insert_value(StringValue& value) {
_dict_data.push_back_without_reserve(value);
_inverted_index[value] = _inverted_index.size();
}
- inline int32_t find_code(const StringValue& value) const {
+ int32_t find_code(const StringValue& value) const {
auto it = _inverted_index.find(value);
if (it != _inverted_index.end()) {
return it->second;
@@ -314,7 +314,7 @@ public:
// so upper_bound is the code 0 of b, then evaluate code < 0 and
returns empty
// If the predicate is col <= 'a' and upper_bound-1 is -1,
// then evaluate code <= -1 and returns empty
- inline int32_t find_code_by_bound(const StringValue& value, bool
greater, bool eq) const {
+ int32_t find_code_by_bound(const StringValue& value, bool greater,
bool eq) const {
auto code = find_code(value);
if (code >= 0) {
return code;
@@ -324,7 +324,7 @@ public:
return greater ? bound - greater + eq : bound - eq;
}
- inline phmap::flat_hash_set<int32_t> find_codes(
+ phmap::flat_hash_set<int32_t> find_codes(
const phmap::flat_hash_set<StringValue>& values) const {
phmap::flat_hash_set<int32_t> code_set;
for (const auto& value : values) {
@@ -336,7 +336,7 @@ public:
return code_set;
}
- inline StringValue& get_value(T code) { return _dict_data[code]; }
+ StringValue& get_value(T code) { return _dict_data[code]; }
void clear() {
_dict_data.clear();
@@ -353,7 +353,7 @@ public:
}
}
- inline T convert_code(const T& code) const { return
_code_convert_map.find(code)->second; }
+ T convert_code(const T& code) const { return
_code_convert_map.find(code)->second; }
size_t byte_size() { return _dict_data.size() * sizeof(_dict_data[0]);
}
diff --git a/be/src/vec/common/columns_hashing_impl.h
b/be/src/vec/common/columns_hashing_impl.h
index 18d02b9a2e..3ba2f630f2 100644
--- a/be/src/vec/common/columns_hashing_impl.h
+++ b/be/src/vec/common/columns_hashing_impl.h
@@ -275,7 +275,7 @@ protected:
/// Return the columns which actually contain the values of the keys.
/// For a given key column, if it is nullable, we return its nested
/// column. Otherwise we return the key column itself.
- inline const ColumnRawPtrs& get_actual_columns() const { return
actual_columns; }
+ const ColumnRawPtrs& get_actual_columns() const { return actual_columns; }
/// Create a bitmap that indicates whether, for a particular row,
/// a key column bears a null value or not.
diff --git a/be/src/vec/common/uint128.h b/be/src/vec/common/uint128.h
index f5e2f9db77..fdce281439 100644
--- a/be/src/vec/common/uint128.h
+++ b/be/src/vec/common/uint128.h
@@ -58,35 +58,35 @@ struct UInt128 {
return String(os.str());
}
- bool inline operator==(const UInt128 rhs) const { return tuple() ==
rhs.tuple(); }
- bool inline operator!=(const UInt128 rhs) const { return tuple() !=
rhs.tuple(); }
- bool inline operator<(const UInt128 rhs) const { return tuple() <
rhs.tuple(); }
- bool inline operator<=(const UInt128 rhs) const { return tuple() <=
rhs.tuple(); }
- bool inline operator>(const UInt128 rhs) const { return tuple() >
rhs.tuple(); }
- bool inline operator>=(const UInt128 rhs) const { return tuple() >=
rhs.tuple(); }
+ bool operator==(const UInt128 rhs) const { return tuple() == rhs.tuple(); }
+ bool operator!=(const UInt128 rhs) const { return tuple() != rhs.tuple(); }
+ bool operator<(const UInt128 rhs) const { return tuple() < rhs.tuple(); }
+ bool operator<=(const UInt128 rhs) const { return tuple() <= rhs.tuple(); }
+ bool operator>(const UInt128 rhs) const { return tuple() > rhs.tuple(); }
+ bool operator>=(const UInt128 rhs) const { return tuple() >= rhs.tuple(); }
template <typename T>
- bool inline operator==(const T rhs) const {
+ bool operator==(const T rhs) const {
return *this == UInt128(rhs);
}
template <typename T>
- bool inline operator!=(const T rhs) const {
+ bool operator!=(const T rhs) const {
return *this != UInt128(rhs);
}
template <typename T>
- bool inline operator>=(const T rhs) const {
+ bool operator>=(const T rhs) const {
return *this >= UInt128(rhs);
}
template <typename T>
- bool inline operator>(const T rhs) const {
+ bool operator>(const T rhs) const {
return *this > UInt128(rhs);
}
template <typename T>
- bool inline operator<=(const T rhs) const {
+ bool operator<=(const T rhs) const {
return *this <= UInt128(rhs);
}
template <typename T>
- bool inline operator<(const T rhs) const {
+ bool operator<(const T rhs) const {
return *this < UInt128(rhs);
}
diff --git a/be/src/vec/core/block.h b/be/src/vec/core/block.h
index 82d85145ca..087f4959cc 100644
--- a/be/src/vec/core/block.h
+++ b/be/src/vec/core/block.h
@@ -245,7 +245,7 @@ public:
static Status filter_block(Block* block, int filter_conlumn_id, int
column_to_keep);
- static inline void erase_useless_column(Block* block, int column_to_keep) {
+ static void erase_useless_column(Block* block, int column_to_keep) {
for (int i = block->columns() - 1; i >= column_to_keep; --i) {
block->erase(i);
}
@@ -311,7 +311,7 @@ public:
private:
void erase_impl(size_t position);
void initialize_index_by_name();
- inline bool is_column_data_null(const doris::TypeDescriptor& type_desc,
+ bool is_column_data_null(const doris::TypeDescriptor& type_desc,
const StringRef& data_ref,
const IColumn* column_with_type_and_name,
int row);
void deep_copy_slot(void* dst, MemPool* pool, const doris::TypeDescriptor&
type_desc,
diff --git a/be/src/vec/functions/functions_logical.cpp
b/be/src/vec/functions/functions_logical.cpp
index 8ef554fd9b..07f4995aee 100644
--- a/be/src/vec/functions/functions_logical.cpp
+++ b/be/src/vec/functions/functions_logical.cpp
@@ -130,7 +130,7 @@ public:
: vec(in[in.size() - N]->get_data()), next(in) {}
/// Returns a combination of values in the i-th row of all columns stored
in the constructor.
- inline ResultValueType apply(const size_t i) const {
+ ResultValueType apply(const size_t i) const {
const auto& a = vec[i];
if constexpr (Op::is_saturable())
return Op::is_saturated_value(a) ? a : Op::apply(a, next.apply(i));
@@ -150,7 +150,7 @@ class AssociativeApplierImpl<Op, 1> {
public:
AssociativeApplierImpl(const UInt8ColumnPtrs& in) : vec(in[in.size() -
1]->get_data()) {}
- inline ResultValueType apply(const size_t i) const { return vec[i]; }
+ ResultValueType apply(const size_t i) const { return vec[i]; }
private:
const UInt8Container& vec;
@@ -207,7 +207,7 @@ public:
: val_getter{ValueGetterBuilder::build(in[in.size() - N])},
next{in} {}
/// Returns a combination of values in the i-th row of all columns stored
in the constructor.
- inline ResultValueType apply(const size_t i) const {
+ ResultValueType apply(const size_t i) const {
const auto a = val_getter(i);
if constexpr (Op::is_saturable())
return Op::is_saturated_value(a) ? a : Op::apply(a, next.apply(i));
diff --git a/be/src/vec/olap/vcollect_iterator.h
b/be/src/vec/olap/vcollect_iterator.h
index b5c0089498..8894462571 100644
--- a/be/src/vec/olap/vcollect_iterator.h
+++ b/be/src/vec/olap/vcollect_iterator.h
@@ -157,11 +157,11 @@ private:
~Level1Iterator();
private:
- inline OLAPStatus _merge_next(IteratorRowRef* ref);
+ OLAPStatus _merge_next(IteratorRowRef* ref);
- inline OLAPStatus _normal_next(IteratorRowRef* ref);
+ OLAPStatus _normal_next(IteratorRowRef* ref);
- inline OLAPStatus _normal_next(Block* block);
+ OLAPStatus _normal_next(Block* block);
// Each LevelIterator corresponds to a rowset reader,
// it will be cleared after '_heap' has been initialized when '_merge
== true'.
diff --git a/be/src/vec/runtime/vdata_stream_mgr.h
b/be/src/vec/runtime/vdata_stream_mgr.h
index 0d1d0f8415..e2bf89c150 100644
--- a/be/src/vec/runtime/vdata_stream_mgr.h
+++ b/be/src/vec/runtime/vdata_stream_mgr.h
@@ -86,7 +86,7 @@ private:
using FragmentStreamSet = std::set<std::pair<TUniqueId, PlanNodeId>,
ComparisonOp>;
FragmentStreamSet _fragment_stream_set;
- inline uint32_t get_hash_value(const TUniqueId& fragment_instance_id,
PlanNodeId node_id);
+ uint32_t get_hash_value(const TUniqueId& fragment_instance_id, PlanNodeId
node_id);
};
} // namespace vectorized
} // namespace doris
diff --git a/be/src/vec/runtime/vdatetime_value.h
b/be/src/vec/runtime/vdatetime_value.h
index 6a77cdce98..dd2e189493 100644
--- a/be/src/vec/runtime/vdatetime_value.h
+++ b/be/src/vec/runtime/vdatetime_value.h
@@ -336,7 +336,7 @@ public:
return true;
};
- inline uint64_t daynr() const { return calc_daynr(_year, _month, _day); }
+ uint64_t daynr() const { return calc_daynr(_year, _month, _day); }
// Calculate how many days since 0000-01-01
// 0000-01-01 is 1st B.C.
@@ -378,8 +378,8 @@ public:
void to_datetime() { _type = TIME_DATETIME; }
// Weekday, from 0(Mon) to 6(Sun)
- inline uint8_t weekday() const { return calc_weekday(daynr(), false); }
- inline auto day_of_week() const { return (weekday() + 1) % 7 + 1; }
+ uint8_t weekday() const { return calc_weekday(daynr(), false); }
+ auto day_of_week() const { return (weekday() + 1) % 7 + 1; }
// The bits in week_format has the following meaning:
// WEEK_MONDAY_FIRST (0)
@@ -497,7 +497,7 @@ public:
return value;
}
- inline uint32_t hash(int seed) const { return HashUtil::hash(this,
sizeof(*this), seed); }
+ uint32_t hash(int seed) const { return HashUtil::hash(this, sizeof(*this),
seed); }
int day_of_year() const { return daynr() - calc_daynr(_year, 1, 1) + 1; }
diff --git a/be/src/vec/runtime/vsorted_run_merger.h
b/be/src/vec/runtime/vsorted_run_merger.h
index 782a361f20..b7e321e8ec 100644
--- a/be/src/vec/runtime/vsorted_run_merger.h
+++ b/be/src/vec/runtime/vsorted_run_merger.h
@@ -83,7 +83,7 @@ protected:
private:
void next_heap(SortCursor& current);
- inline bool has_next_block(SortCursor& current);
+ bool has_next_block(SortCursor& current);
};
}
diff --git a/be/src/vec/sink/vdata_stream_sender.h
b/be/src/vec/sink/vdata_stream_sender.h
index d62ebeb684..155ed53277 100644
--- a/be/src/vec/sink/vdata_stream_sender.h
+++ b/be/src/vec/sink/vdata_stream_sender.h
@@ -233,7 +233,7 @@ public:
void ch_roll_pb_block();
private:
- inline Status _wait_last_brpc() {
+ Status _wait_last_brpc() {
if (_closure == nullptr) return Status::OK();
auto cntl = &_closure->cntl;
auto call_id = _closure->cntl.call_id();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]