[Fix](compile) Fix gcc compile on master (#33864)
This is imported by #33511. wrongly used ColumnStr<T> (); which violate C++20 standard(see https://wg21.cmeerw.net/cwg/issue2237) but still supported by clang up until now(see llvm/llvm-project#58112)
This commit is contained in:
@ -54,6 +54,7 @@ ColumnStruct::ColumnStruct(MutableColumns&& mutable_columns) {
|
||||
for (auto& column : mutable_columns) {
|
||||
if (is_column_const(*column)) {
|
||||
LOG(FATAL) << "ColumnStruct cannot have ColumnConst as its element";
|
||||
__builtin_unreachable();
|
||||
}
|
||||
columns.push_back(std::move(column));
|
||||
}
|
||||
@ -63,6 +64,7 @@ ColumnStruct::Ptr ColumnStruct::create(const Columns& columns) {
|
||||
for (const auto& column : columns) {
|
||||
if (is_column_const(*column)) {
|
||||
LOG(FATAL) << "ColumnStruct cannot have ColumnConst as its element";
|
||||
__builtin_unreachable();
|
||||
}
|
||||
}
|
||||
auto column_struct = ColumnStruct::create(MutableColumns());
|
||||
@ -74,6 +76,7 @@ ColumnStruct::Ptr ColumnStruct::create(const TupleColumns& tuple_columns) {
|
||||
for (const auto& column : tuple_columns) {
|
||||
if (is_column_const(*column)) {
|
||||
LOG(FATAL) << "ColumnStruct cannot have ColumnConst as its element";
|
||||
__builtin_unreachable();
|
||||
}
|
||||
}
|
||||
auto column_struct = ColumnStruct::create(MutableColumns());
|
||||
@ -146,6 +149,7 @@ void ColumnStruct::insert_from(const IColumn& src_, size_t n) {
|
||||
const size_t tuple_size = columns.size();
|
||||
if (src.columns.size() != tuple_size) {
|
||||
LOG(FATAL) << "Cannot insert value of different size into tuple.";
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < tuple_size; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user