This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new d534cdf0272 [compile](BE) let arm gcc know some function no return
(#28157)
d534cdf0272 is described below
commit d534cdf027281e74e20325d83f5b1cbac122ca6b
Author: zclllyybb <[email protected]>
AuthorDate: Fri Dec 8 11:32:08 2023 +0800
[compile](BE) let arm gcc know some function no return (#28157)
let arm gcc know some function no return
---
be/src/vec/columns/column_array.h | 2 ++
be/src/vec/columns/column_complex.h | 10 +++++++++
be/src/vec/columns/column_dictionary.h | 12 +++++++++++
be/src/vec/columns/column_dummy.h | 1 +
be/src/vec/columns/column_fixed_length_object.h | 6 ++++++
be/src/vec/columns/column_map.h | 1 +
be/src/vec/columns/column_object.h | 6 +++++-
be/src/vec/columns/column_struct.h | 3 +++
be/src/vec/columns/predicate_column.h | 17 +++++++++++++++
be/src/vec/data_types/convert_field_to_type.cpp | 25 ++++++++++++++++++----
be/src/vec/data_types/data_type_array.h | 1 +
be/src/vec/data_types/data_type_bitmap.h | 1 +
.../vec/data_types/data_type_fixed_length_object.h | 1 +
be/src/vec/data_types/data_type_hll.h | 1 +
be/src/vec/data_types/data_type_map.h | 1 +
be/src/vec/data_types/data_type_nothing.h | 2 ++
be/src/vec/data_types/data_type_quantilestate.h | 1 +
be/src/vec/functions/if.cpp | 1 +
18 files changed, 87 insertions(+), 5 deletions(-)
diff --git a/be/src/vec/columns/column_array.h
b/be/src/vec/columns/column_array.h
index 01ce3bcfe28..222e8a911c4 100644
--- a/be/src/vec/columns/column_array.h
+++ b/be/src/vec/columns/column_array.h
@@ -166,10 +166,12 @@ public:
[[noreturn]] int compare_at(size_t n, size_t m, const IColumn& rhs_,
int nan_direction_hint) const override {
LOG(FATAL) << "compare_at not implemented";
+ __builtin_unreachable();
}
[[noreturn]] void get_permutation(bool reverse, size_t limit, int
nan_direction_hint,
Permutation& res) const override {
LOG(FATAL) << "get_permutation not implemented";
+ __builtin_unreachable();
}
void reserve(size_t n) override;
size_t byte_size() const override;
diff --git a/be/src/vec/columns/column_complex.h
b/be/src/vec/columns/column_complex.h
index fc8268ec791..b004d946aae 100644
--- a/be/src/vec/columns/column_complex.h
+++ b/be/src/vec/columns/column_complex.h
@@ -123,6 +123,7 @@ public:
[[noreturn]] void get_permutation(bool reverse, size_t limit, int
nan_direction_hint,
IColumn::Permutation& res) const
override {
LOG(FATAL) << "get_permutation not implemented";
+ __builtin_unreachable();
}
void get_indices_of_non_default_rows(IColumn::Offsets64& indices, size_t
from,
@@ -131,6 +132,7 @@ public:
}
[[noreturn]] ColumnPtr index(const IColumn& indexes, size_t limit) const
override {
LOG(FATAL) << "index not implemented";
+ __builtin_unreachable();
}
void reserve(size_t n) override { data.reserve(n); }
@@ -158,22 +160,27 @@ public:
[[noreturn]] UInt64 get64(size_t n) const override {
LOG(FATAL) << "get field not implemented";
+ __builtin_unreachable();
}
[[noreturn]] Float64 get_float64(size_t n) const override {
LOG(FATAL) << "get field not implemented";
+ __builtin_unreachable();
}
[[noreturn]] UInt64 get_uint(size_t n) const override {
LOG(FATAL) << "get field not implemented";
+ __builtin_unreachable();
}
[[noreturn]] bool get_bool(size_t n) const override {
LOG(FATAL) << "get field not implemented";
+ __builtin_unreachable();
}
[[noreturn]] Int64 get_int(size_t n) const override {
LOG(FATAL) << "get field not implemented";
+ __builtin_unreachable();
}
void insert_range_from(const IColumn& src, size_t start, size_t length)
override {
@@ -200,10 +207,12 @@ public:
[[noreturn]] StringRef serialize_value_into_arena(size_t n, Arena& arena,
char const*& begin)
const override {
LOG(FATAL) << "serialize_value_into_arena not implemented";
+ __builtin_unreachable();
}
[[noreturn]] const char* deserialize_and_insert_from_arena(const char*
pos) override {
LOG(FATAL) << "deserialize_and_insert_from_arena not implemented";
+ __builtin_unreachable();
}
// maybe we do not need to impl the function
@@ -261,6 +270,7 @@ public:
[[noreturn]] MutableColumns scatter(IColumn::ColumnIndex num_columns,
const IColumn::Selector& selector)
const override {
LOG(FATAL) << "scatter not implemented";
+ __builtin_unreachable();
}
void append_data_by_selector(MutableColumnPtr& res,
diff --git a/be/src/vec/columns/column_dictionary.h
b/be/src/vec/columns/column_dictionary.h
index 95238bf4f26..06e0a352be2 100644
--- a/be/src/vec/columns/column_dictionary.h
+++ b/be/src/vec/columns/column_dictionary.h
@@ -67,6 +67,7 @@ public:
[[noreturn]] StringRef get_data_at(size_t n) const override {
LOG(FATAL) << "get_data_at not supported in ColumnDictionary";
+ __builtin_unreachable();
}
void insert_from(const IColumn& src, size_t n) override {
@@ -135,15 +136,18 @@ public:
[[noreturn]] StringRef serialize_value_into_arena(size_t n, Arena& arena,
char const*& begin)
const override {
LOG(FATAL) << "serialize_value_into_arena not supported in
ColumnDictionary";
+ __builtin_unreachable();
}
[[noreturn]] const char* deserialize_and_insert_from_arena(const char*
pos) override {
LOG(FATAL) << "deserialize_and_insert_from_arena not supported in
ColumnDictionary";
+ __builtin_unreachable();
}
[[noreturn]] int compare_at(size_t n, size_t m, const IColumn& rhs,
int nan_direction_hint) const override {
LOG(FATAL) << "compare_at not supported in ColumnDictionary";
+ __builtin_unreachable();
}
bool is_fixed_and_contiguous() const override { return true; }
@@ -157,32 +161,39 @@ public:
[[noreturn]] StringRef get_raw_data() const override {
LOG(FATAL) << "get_raw_data not supported in ColumnDictionary";
+ __builtin_unreachable();
}
[[noreturn]] bool structure_equals(const IColumn& rhs) const override {
LOG(FATAL) << "structure_equals not supported in ColumnDictionary";
+ __builtin_unreachable();
}
[[noreturn]] ColumnPtr filter(const IColumn::Filter& filt,
ssize_t result_size_hint) const override {
LOG(FATAL) << "filter not supported in ColumnDictionary";
+ __builtin_unreachable();
}
[[noreturn]] size_t filter(const IColumn::Filter&) override {
LOG(FATAL) << "filter not supported in ColumnDictionary";
+ __builtin_unreachable();
}
[[noreturn]] ColumnPtr permute(const IColumn::Permutation& perm, size_t
limit) const override {
LOG(FATAL) << "permute not supported in ColumnDictionary";
+ __builtin_unreachable();
}
[[noreturn]] ColumnPtr replicate(const IColumn::Offsets&
replicate_offsets) const override {
LOG(FATAL) << "replicate not supported in ColumnDictionary";
+ __builtin_unreachable();
}
[[noreturn]] MutableColumns scatter(IColumn::ColumnIndex num_columns,
const IColumn::Selector& selector)
const override {
LOG(FATAL) << "scatter not supported in ColumnDictionary";
+ __builtin_unreachable();
}
void append_data_by_selector(MutableColumnPtr& res,
@@ -192,6 +203,7 @@ public:
[[noreturn]] ColumnPtr index(const IColumn& indexes, size_t limit) const
override {
LOG(FATAL) << "index not implemented";
+ __builtin_unreachable();
}
Status filter_by_selector(const uint16_t* sel, size_t sel_size, IColumn*
col_ptr) override {
diff --git a/be/src/vec/columns/column_dummy.h
b/be/src/vec/columns/column_dummy.h
index a2d76ade562..f1f7dac52d5 100644
--- a/be/src/vec/columns/column_dummy.h
+++ b/be/src/vec/columns/column_dummy.h
@@ -48,6 +48,7 @@ public:
[[noreturn]] Field operator[](size_t) const override {
LOG(FATAL) << "Cannot get value from " << get_name();
+ __builtin_unreachable();
}
void get(size_t, Field&) const override {
diff --git a/be/src/vec/columns/column_fixed_length_object.h
b/be/src/vec/columns/column_fixed_length_object.h
index d391bcc43f6..6eefc789aa0 100644
--- a/be/src/vec/columns/column_fixed_length_object.h
+++ b/be/src/vec/columns/column_fixed_length_object.h
@@ -105,6 +105,7 @@ public:
[[noreturn]] Field operator[](size_t n) const override {
LOG(FATAL) << "operator[] not supported";
+ __builtin_unreachable();
}
void get(size_t n, Field& res) const override { LOG(FATAL) << "get not
supported"; }
@@ -175,19 +176,23 @@ public:
[[noreturn]] ColumnPtr filter(const IColumn::Filter& filt,
ssize_t result_size_hint) const override {
LOG(FATAL) << "filter not supported";
+ __builtin_unreachable();
}
[[noreturn]] size_t filter(const IColumn::Filter&) override {
LOG(FATAL) << "filter not supported";
+ __builtin_unreachable();
}
[[noreturn]] ColumnPtr permute(const IColumn::Permutation& perm, size_t
limit) const override {
LOG(FATAL) << "permute not supported";
+ __builtin_unreachable();
}
[[noreturn]] int compare_at(size_t n, size_t m, const IColumn& rhs,
int nan_direction_hint) const override {
LOG(FATAL) << "compare_at not supported";
+ __builtin_unreachable();
}
void get_permutation(bool reverse, size_t limit, int nan_direction_hint,
@@ -234,6 +239,7 @@ public:
[[noreturn]] MutableColumns scatter(IColumn::ColumnIndex num_columns,
const IColumn::Selector& selector)
const override {
LOG(FATAL) << "scatter not supported";
+ __builtin_unreachable();
}
void append_data_by_selector(MutableColumnPtr& res,
diff --git a/be/src/vec/columns/column_map.h b/be/src/vec/columns/column_map.h
index 752de2e10c7..59725111d73 100644
--- a/be/src/vec/columns/column_map.h
+++ b/be/src/vec/columns/column_map.h
@@ -122,6 +122,7 @@ public:
[[noreturn]] int compare_at(size_t n, size_t m, const IColumn& rhs_,
int nan_direction_hint) const override {
LOG(FATAL) << "compare_at not implemented";
+ __builtin_unreachable();
}
void get_permutation(bool reverse, size_t limit, int nan_direction_hint,
Permutation& res) const override {
diff --git a/be/src/vec/columns/column_object.h
b/be/src/vec/columns/column_object.h
index 8efec7ad122..385411cb486 100644
--- a/be/src/vec/columns/column_object.h
+++ b/be/src/vec/columns/column_object.h
@@ -279,9 +279,13 @@ public:
const Subcolumn* get_subcolumn(const PathInData& key) const;
/** More efficient methods of manipulation */
- [[noreturn]] IColumn& get_data() { LOG(FATAL) << "Not implemented method
get_data()"; }
+ [[noreturn]] IColumn& get_data() {
+ LOG(FATAL) << "Not implemented method get_data()";
+ __builtin_unreachable();
+ }
[[noreturn]] const IColumn& get_data() const {
LOG(FATAL) << "Not implemented method get_data()";
+ __builtin_unreachable();
}
// return null if not found
diff --git a/be/src/vec/columns/column_struct.h
b/be/src/vec/columns/column_struct.h
index e2da7fd6440..a3141521e50 100644
--- a/be/src/vec/columns/column_struct.h
+++ b/be/src/vec/columns/column_struct.h
@@ -94,9 +94,11 @@ public:
bool is_default_at(size_t n) const override;
[[noreturn]] StringRef get_data_at(size_t n) const override {
LOG(FATAL) << "Method get_data_at is not supported for " + get_name();
+ __builtin_unreachable();
}
[[noreturn]] void insert_data(const char* pos, size_t length) override {
LOG(FATAL) << "Method insert_data is not supported for " + get_name();
+ __builtin_unreachable();
}
void insert(const Field& x) override;
void insert_from(const IColumn& src_, size_t n) override;
@@ -159,6 +161,7 @@ public:
[[noreturn]] int compare_at(size_t n, size_t m, const IColumn& rhs_,
int nan_direction_hint) const override {
LOG(FATAL) << "compare_at not implemented";
+ __builtin_unreachable();
}
MutableColumnPtr get_shrinked_column() override;
diff --git a/be/src/vec/columns/predicate_column.h
b/be/src/vec/columns/predicate_column.h
index c42f0a33225..95a8a84327b 100644
--- a/be/src/vec/columns/predicate_column.h
+++ b/be/src/vec/columns/predicate_column.h
@@ -146,6 +146,7 @@ public:
[[noreturn]] ColumnPtr index(const IColumn& indexes, size_t limit) const
override {
LOG(FATAL) << "index not supported in PredicateColumnType";
+ __builtin_unreachable();
}
void insert_string_value(const char* data_ptr, size_t length) {
@@ -340,6 +341,7 @@ public:
[[noreturn]] Field operator[](size_t n) const override {
LOG(FATAL) << "operator[] not supported in PredicateColumnType";
+ __builtin_unreachable();
}
void get(size_t n, Field& res) const override {
@@ -348,22 +350,27 @@ public:
[[noreturn]] UInt64 get64(size_t n) const override {
LOG(FATAL) << "get field not supported in PredicateColumnTyped";
+ __builtin_unreachable();
}
[[noreturn]] Float64 get_float64(size_t n) const override {
LOG(FATAL) << "get field not supported in PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] UInt64 get_uint(size_t n) const override {
LOG(FATAL) << "get field not supported in PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] bool get_bool(size_t n) const override {
LOG(FATAL) << "get field not supported in PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] Int64 get_int(size_t n) const override {
LOG(FATAL) << "get field not supported in PredicateColumnType";
+ __builtin_unreachable();
}
void replicate(const uint32_t* indexs, size_t target_size, IColumn&
column) const override {
@@ -374,15 +381,18 @@ public:
[[noreturn]] StringRef serialize_value_into_arena(size_t n, Arena& arena,
char const*& begin)
const override {
LOG(FATAL) << "serialize_value_into_arena not supported in
PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] const char* deserialize_and_insert_from_arena(const char*
pos) override {
LOG(FATAL) << "deserialize_and_insert_from_arena not supported in
PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] int compare_at(size_t n, size_t m, const IColumn& rhs,
int nan_direction_hint) const override {
LOG(FATAL) << "compare_at not supported in PredicateColumnType";
+ __builtin_unreachable();
}
bool is_fixed_and_contiguous() const override { return true; }
@@ -390,23 +400,28 @@ public:
[[noreturn]] StringRef get_raw_data() const override {
LOG(FATAL) << "get_raw_data not supported in PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] bool structure_equals(const IColumn& rhs) const override {
LOG(FATAL) << "structure_equals not supported in PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] ColumnPtr filter(const IColumn::Filter& filt,
ssize_t result_size_hint) const override {
LOG(FATAL) << "filter not supported in PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] size_t filter(const IColumn::Filter&) override {
LOG(FATAL) << "filter not supported in PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] ColumnPtr permute(const IColumn::Permutation& perm, size_t
limit) const override {
LOG(FATAL) << "permute not supported in PredicateColumnType";
+ __builtin_unreachable();
}
Container& get_data() { return data; }
@@ -415,11 +430,13 @@ public:
[[noreturn]] ColumnPtr replicate(const IColumn::Offsets&
replicate_offsets) const override {
LOG(FATAL) << "replicate not supported in PredicateColumnType";
+ __builtin_unreachable();
}
[[noreturn]] MutableColumns scatter(IColumn::ColumnIndex num_columns,
const IColumn::Selector& selector)
const override {
LOG(FATAL) << "scatter not supported in PredicateColumnType";
+ __builtin_unreachable();
}
void append_data_by_selector(MutableColumnPtr& res,
diff --git a/be/src/vec/data_types/convert_field_to_type.cpp
b/be/src/vec/data_types/convert_field_to_type.cpp
index af6d98cd614..13e1ce62924 100644
--- a/be/src/vec/data_types/convert_field_to_type.cpp
+++ b/be/src/vec/data_types/convert_field_to_type.cpp
@@ -69,25 +69,42 @@ public:
String operator()(const Int64& x) const { return std::to_string(x); }
String operator()(const Float64& x) const { return std::to_string(x); }
String operator()(const String& x) const { return x; }
- [[noreturn]] String operator()(const UInt128& x) const { LOG(FATAL) <<
"not implemeted"; }
- [[noreturn]] String operator()(const Array& x) const { LOG(FATAL) << "not
implemeted"; }
- [[noreturn]] String operator()(const Tuple& x) const { LOG(FATAL) << "not
implemeted"; }
+ [[noreturn]] String operator()(const UInt128& x) const {
+ LOG(FATAL) << "not implemeted";
+ __builtin_unreachable();
+ }
+ [[noreturn]] String operator()(const Array& x) const {
+ LOG(FATAL) << "not implemeted";
+ __builtin_unreachable();
+ }
+ [[noreturn]] String operator()(const Tuple& x) const {
+ LOG(FATAL) << "not implemeted";
+ __builtin_unreachable();
+ }
[[noreturn]] String operator()(const DecimalField<Decimal32>& x) const {
LOG(FATAL) << "not implemeted";
+ __builtin_unreachable();
}
[[noreturn]] String operator()(const DecimalField<Decimal64>& x) const {
LOG(FATAL) << "not implemeted";
+ __builtin_unreachable();
}
[[noreturn]] String operator()(const DecimalField<Decimal128>& x) const {
LOG(FATAL) << "not implemeted";
+ __builtin_unreachable();
}
[[noreturn]] String operator()(const DecimalField<Decimal128I>& x) const {
LOG(FATAL) << "not implemeted";
+ __builtin_unreachable();
}
[[noreturn]] String operator()(const DecimalField<Decimal256>& x) const {
LOG(FATAL) << "not implemeted";
+ __builtin_unreachable();
+ }
+ [[noreturn]] String operator()(const JsonbField& x) const {
+ LOG(FATAL) << "not implemeted";
+ __builtin_unreachable();
}
- [[noreturn]] String operator()(const JsonbField& x) const { LOG(FATAL) <<
"not implemeted"; }
};
class FieldVisitorToJsonb : public StaticVisitor<void> {
diff --git a/be/src/vec/data_types/data_type_array.h
b/be/src/vec/data_types/data_type_array.h
index bca53d62fdc..7441538b839 100644
--- a/be/src/vec/data_types/data_type_array.h
+++ b/be/src/vec/data_types/data_type_array.h
@@ -79,6 +79,7 @@ public:
[[noreturn]] Field get_field(const TExprNode& node) const override {
LOG(FATAL) << "Unimplemented get_field for array";
+ __builtin_unreachable();
}
bool equals(const IDataType& rhs) const override;
diff --git a/be/src/vec/data_types/data_type_bitmap.h
b/be/src/vec/data_types/data_type_bitmap.h
index 90ed1620b73..08b46161779 100644
--- a/be/src/vec/data_types/data_type_bitmap.h
+++ b/be/src/vec/data_types/data_type_bitmap.h
@@ -106,6 +106,7 @@ public:
[[noreturn]] Field get_field(const TExprNode& node) const override {
LOG(FATAL) << "Unimplemented get_field for BitMap";
+ __builtin_unreachable();
}
static void serialize_as_stream(const BitmapValue& value, BufferWritable&
buf);
diff --git a/be/src/vec/data_types/data_type_fixed_length_object.h
b/be/src/vec/data_types/data_type_fixed_length_object.h
index 699972ccc21..c7d5ab65290 100644
--- a/be/src/vec/data_types/data_type_fixed_length_object.h
+++ b/be/src/vec/data_types/data_type_fixed_length_object.h
@@ -64,6 +64,7 @@ public:
[[noreturn]] Field get_field(const TExprNode& node) const override {
LOG(FATAL) << "Unimplemented get_field for DataTypeFixedLengthObject";
+ __builtin_unreachable();
}
bool equals(const IDataType& rhs) const override { return typeid(rhs) ==
typeid(*this); }
diff --git a/be/src/vec/data_types/data_type_hll.h
b/be/src/vec/data_types/data_type_hll.h
index 92397025f81..03293565907 100644
--- a/be/src/vec/data_types/data_type_hll.h
+++ b/be/src/vec/data_types/data_type_hll.h
@@ -94,6 +94,7 @@ public:
[[noreturn]] Field get_field(const TExprNode& node) const override {
LOG(FATAL) << "Unimplemented get_field for HLL";
+ __builtin_unreachable();
}
static void serialize_as_stream(const HyperLogLog& value, BufferWritable&
buf);
diff --git a/be/src/vec/data_types/data_type_map.h
b/be/src/vec/data_types/data_type_map.h
index d9a080097aa..fab925cc6f4 100644
--- a/be/src/vec/data_types/data_type_map.h
+++ b/be/src/vec/data_types/data_type_map.h
@@ -80,6 +80,7 @@ public:
[[noreturn]] Field get_field(const TExprNode& node) const override {
LOG(FATAL) << "Unimplemented get_field for map";
+ __builtin_unreachable();
}
bool equals(const IDataType& rhs) const override;
diff --git a/be/src/vec/data_types/data_type_nothing.h
b/be/src/vec/data_types/data_type_nothing.h
index 4df7c8a082a..71733d6d34c 100644
--- a/be/src/vec/data_types/data_type_nothing.h
+++ b/be/src/vec/data_types/data_type_nothing.h
@@ -78,10 +78,12 @@ public:
[[noreturn]] Field get_default() const override {
LOG(FATAL) << "Method get_default() is not implemented for data type "
<< get_name();
+ __builtin_unreachable();
}
[[noreturn]] Field get_field(const TExprNode& node) const override {
LOG(FATAL) << "Unimplemented get_field for Nothing";
+ __builtin_unreachable();
}
void insert_default_into(IColumn&) const override {
diff --git a/be/src/vec/data_types/data_type_quantilestate.h
b/be/src/vec/data_types/data_type_quantilestate.h
index 6ef1e31dea2..c07e1eb3a42 100644
--- a/be/src/vec/data_types/data_type_quantilestate.h
+++ b/be/src/vec/data_types/data_type_quantilestate.h
@@ -94,6 +94,7 @@ public:
[[noreturn]] Field get_field(const TExprNode& node) const override {
LOG(FATAL) << "Unimplemented get_field for quantilestate";
+ __builtin_unreachable();
}
static void serialize_as_stream(const QuantileState& value,
BufferWritable& buf);
diff --git a/be/src/vec/functions/if.cpp b/be/src/vec/functions/if.cpp
index 8eea19940df..0d433514a11 100644
--- a/be/src/vec/functions/if.cpp
+++ b/be/src/vec/functions/if.cpp
@@ -119,6 +119,7 @@ struct NumIfImpl<A, B, NumberTraits::Error> {
private:
[[noreturn]] static void throw_error() {
LOG(FATAL) << "Internal logic error: invalid types of arguments 2 and
3 of if";
+ __builtin_unreachable();
}
public:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]