mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
impl
This commit is contained in:
parent
9bef8a43df
commit
5608914bca
@ -87,10 +87,17 @@
|
||||
# define ASAN_POISON_MEMORY_REGION(a, b)
|
||||
#endif
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(NDEBUG) || defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || defined(MEMORY_SANITIZER) || defined(UNDEFINED_BEHAVIOR_SANITIZER)
|
||||
#define ABORT_ON_LOGICAL_ERROR
|
||||
#endif
|
||||
/// We used to have only ABORT_ON_LOGICAL_ERROR macro, but most of its uses were actually in places where we didn't care about logical errors
|
||||
/// but wanted to check exactly if the current build type is debug or with sanitizer. This new macro is introduced to fix those places.
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
# if !defined(NDEBUG) || defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || defined(MEMORY_SANITIZER) \
|
||||
|| defined(UNDEFINED_BEHAVIOR_SANITIZER)
|
||||
# define DEBUG_OR_SANITIZER_BUILD
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR) && defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
# define ABORT_ON_LOGICAL_ERROR
|
||||
#endif
|
||||
|
||||
/// chassert(x) is similar to assert(x), but:
|
||||
|
@ -62,7 +62,7 @@ namespace ErrorCodes
|
||||
namespace
|
||||
{
|
||||
|
||||
#if defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
|
||||
/** This visitor checks if Query Tree structure is valid after each pass
|
||||
* in debug build.
|
||||
@ -183,7 +183,7 @@ void QueryTreePassManager::run(QueryTreeNodePtr query_tree_node)
|
||||
for (size_t i = 0; i < passes_size; ++i)
|
||||
{
|
||||
passes[i]->run(query_tree_node, current_context);
|
||||
#if defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
ValidationChecker(passes[i]->getName()).visit(query_tree_node);
|
||||
#endif
|
||||
}
|
||||
@ -208,7 +208,7 @@ void QueryTreePassManager::run(QueryTreeNodePtr query_tree_node, size_t up_to_pa
|
||||
for (size_t i = 0; i < up_to_pass_index; ++i)
|
||||
{
|
||||
passes[i]->run(query_tree_node, current_context);
|
||||
#if defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
ValidationChecker(passes[i]->getName()).visit(query_tree_node);
|
||||
#endif
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ bool ColumnAggregateFunction::structureEquals(const IColumn & to) const
|
||||
}
|
||||
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnAggregateFunction::insertRangeFrom(const IColumn & from, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnAggregateFunction::doInsertRangeFrom(const IColumn & from, size_t start, size_t length)
|
||||
@ -466,7 +466,7 @@ void ColumnAggregateFunction::insertFromWithOwnership(const IColumn & from, size
|
||||
insertMergeFrom(from, n);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnAggregateFunction::insertFrom(const IColumn & from, size_t n)
|
||||
#else
|
||||
void ColumnAggregateFunction::doInsertFrom(const IColumn & from, size_t n)
|
||||
|
@ -145,7 +145,7 @@ public:
|
||||
|
||||
void insertData(const char * pos, size_t length) override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & from, size_t n) override;
|
||||
#else
|
||||
using IColumn::insertFrom;
|
||||
@ -189,7 +189,7 @@ public:
|
||||
|
||||
void protect() override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & from, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & from, size_t start, size_t length) override;
|
||||
@ -212,7 +212,7 @@ public:
|
||||
|
||||
MutableColumns scatter(ColumnIndex num_columns, const Selector & selector) const override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t, size_t, const IColumn &, int) const override
|
||||
#else
|
||||
int doCompareAt(size_t, size_t, const IColumn &, int) const override
|
||||
|
@ -337,7 +337,7 @@ bool ColumnArray::tryInsert(const Field & x)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnArray::insertFrom(const IColumn & src_, size_t n)
|
||||
#else
|
||||
void ColumnArray::doInsertFrom(const IColumn & src_, size_t n)
|
||||
@ -396,7 +396,7 @@ int ColumnArray::compareAtImpl(size_t n, size_t m, const IColumn & rhs_, int nan
|
||||
: 1);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnArray::compareAt(size_t n, size_t m, const IColumn & rhs_, int nan_direction_hint) const
|
||||
#else
|
||||
int ColumnArray::doCompareAt(size_t n, size_t m, const IColumn & rhs_, int nan_direction_hint) const
|
||||
@ -543,7 +543,7 @@ void ColumnArray::getExtremes(Field & min, Field & max) const
|
||||
}
|
||||
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnArray::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnArray::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
|
@ -84,14 +84,14 @@ public:
|
||||
void updateHashWithValue(size_t n, SipHash & hash) const override;
|
||||
void updateWeakHash32(WeakHash32 & hash) const override;
|
||||
void updateHashFast(SipHash & hash) const override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#endif
|
||||
void insert(const Field & x) override;
|
||||
bool tryInsert(const Field & x) override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src_, size_t n) override;
|
||||
#else
|
||||
void doInsertFrom(const IColumn & src_, size_t n) override;
|
||||
@ -103,7 +103,7 @@ public:
|
||||
ColumnPtr permute(const Permutation & perm, size_t limit) const override;
|
||||
ColumnPtr index(const IColumn & indexes, size_t limit) const override;
|
||||
template <typename Type> ColumnPtr indexImpl(const PaddedPODArray<Type> & indexes, size_t limit) const;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs_, int nan_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs_, int nan_direction_hint) const override;
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
bool isDefaultAt(size_t) const override { throwMustBeDecompressed(); }
|
||||
void insert(const Field &) override { throwMustBeDecompressed(); }
|
||||
bool tryInsert(const Field &) override { throwMustBeDecompressed(); }
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn &, size_t, size_t) override { throwMustBeDecompressed(); }
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn &, size_t, size_t) override { throwMustBeDecompressed(); }
|
||||
@ -104,7 +104,7 @@ public:
|
||||
void expand(const Filter &, bool) override { throwMustBeDecompressed(); }
|
||||
ColumnPtr permute(const Permutation &, size_t) const override { throwMustBeDecompressed(); }
|
||||
ColumnPtr index(const IColumn &, size_t) const override { throwMustBeDecompressed(); }
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t, size_t, const IColumn &, int) const override { throwMustBeDecompressed(); }
|
||||
#else
|
||||
int doCompareAt(size_t, size_t, const IColumn &, int) const override { throwMustBeDecompressed(); }
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
return data->isNullAt(0);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn &, size_t /*start*/, size_t length) override
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn &, size_t /*start*/, size_t length) override
|
||||
@ -151,7 +151,7 @@ public:
|
||||
++s;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn &, size_t) override
|
||||
#else
|
||||
void doInsertFrom(const IColumn &, size_t) override
|
||||
@ -160,7 +160,7 @@ public:
|
||||
++s;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertManyFrom(const IColumn & /*src*/, size_t /* position */, size_t length) override { s += length; }
|
||||
#else
|
||||
void doInsertManyFrom(const IColumn & /*src*/, size_t /* position */, size_t length) override { s += length; }
|
||||
@ -237,7 +237,7 @@ public:
|
||||
return data->allocatedBytes() + sizeof(s);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t, size_t, const IColumn & rhs, int nan_direction_hint) const override
|
||||
#else
|
||||
int doCompareAt(size_t, size_t, const IColumn & rhs, int nan_direction_hint) const override
|
||||
|
@ -32,7 +32,7 @@ namespace ErrorCodes
|
||||
}
|
||||
|
||||
template <is_decimal T>
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnDecimal<T>::compareAt(size_t n, size_t m, const IColumn & rhs_, int) const
|
||||
#else
|
||||
int ColumnDecimal<T>::doCompareAt(size_t n, size_t m, const IColumn & rhs_, int) const
|
||||
@ -335,7 +335,7 @@ void ColumnDecimal<T>::insertData(const char * src, size_t /*length*/)
|
||||
}
|
||||
|
||||
template <is_decimal T>
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnDecimal<T>::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnDecimal<T>::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
|
@ -55,13 +55,13 @@ public:
|
||||
void reserve(size_t n) override { data.reserve_exact(n); }
|
||||
void shrinkToFit() override { data.shrink_to_fit(); }
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src, size_t n) override { data.push_back(static_cast<const Self &>(src).getData()[n]); }
|
||||
#else
|
||||
void doInsertFrom(const IColumn & src, size_t n) override { data.push_back(static_cast<const Self &>(src).getData()[n]); }
|
||||
#endif
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertManyFrom(const IColumn & src, size_t position, size_t length) override
|
||||
#else
|
||||
void doInsertManyFrom(const IColumn & src, size_t position, size_t length) override
|
||||
@ -76,7 +76,7 @@ public:
|
||||
void insertManyDefaults(size_t length) override { data.resize_fill(data.size() + length); }
|
||||
void insert(const Field & x) override { data.push_back(x.get<T>()); }
|
||||
bool tryInsert(const Field & x) override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
@ -104,7 +104,7 @@ public:
|
||||
void updateHashWithValue(size_t n, SipHash & hash) const override;
|
||||
void updateWeakHash32(WeakHash32 & hash) const override;
|
||||
void updateHashFast(SipHash & hash) const override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs_, int nan_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs_, int nan_direction_hint) const override;
|
||||
|
@ -215,7 +215,7 @@ bool ColumnDynamic::tryInsert(const DB::Field & x)
|
||||
}
|
||||
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnDynamic::insertFrom(const DB::IColumn & src_, size_t n)
|
||||
#else
|
||||
void ColumnDynamic::doInsertFrom(const DB::IColumn & src_, size_t n)
|
||||
@ -269,7 +269,7 @@ void ColumnDynamic::doInsertFrom(const DB::IColumn & src_, size_t n)
|
||||
variant_col.insertIntoVariantFrom(string_variant_discr, *tmp_string_column, 0);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnDynamic::insertRangeFrom(const DB::IColumn & src_, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnDynamic::doInsertRangeFrom(const DB::IColumn & src_, size_t start, size_t length)
|
||||
@ -439,7 +439,7 @@ void ColumnDynamic::doInsertRangeFrom(const DB::IColumn & src_, size_t start, si
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnDynamic::insertManyFrom(const DB::IColumn & src_, size_t position, size_t length)
|
||||
#else
|
||||
void ColumnDynamic::doInsertManyFrom(const DB::IColumn & src_, size_t position, size_t length)
|
||||
@ -603,7 +603,7 @@ void ColumnDynamic::updateHashWithValue(size_t n, SipHash & hash) const
|
||||
variant_col.getVariantByGlobalDiscriminator(discr).updateHashWithValue(variant_col.offsetAt(n), hash);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnDynamic::compareAt(size_t n, size_t m, const DB::IColumn & rhs, int nan_direction_hint) const
|
||||
#else
|
||||
int ColumnDynamic::doCompareAt(size_t n, size_t m, const DB::IColumn & rhs, int nan_direction_hint) const
|
||||
|
@ -143,7 +143,7 @@ public:
|
||||
void insert(const Field & x) override;
|
||||
bool tryInsert(const Field & x) override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src_, size_t n) override;
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
void insertManyFrom(const IColumn & src, size_t position, size_t length) override;
|
||||
@ -220,7 +220,7 @@ public:
|
||||
return scattered_columns;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
|
@ -74,7 +74,7 @@ bool ColumnFixedString::tryInsert(const Field & x)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnFixedString::insertFrom(const IColumn & src_, size_t index)
|
||||
#else
|
||||
void ColumnFixedString::doInsertFrom(const IColumn & src_, size_t index)
|
||||
@ -90,7 +90,7 @@ void ColumnFixedString::doInsertFrom(const IColumn & src_, size_t index)
|
||||
memcpySmallAllowReadWriteOverflow15(chars.data() + old_size, &src.chars[n * index], n);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnFixedString::insertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
#else
|
||||
void ColumnFixedString::doInsertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
@ -227,7 +227,7 @@ size_t ColumnFixedString::estimateCardinalityInPermutedRange(const Permutation &
|
||||
return elements.size();
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnFixedString::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnFixedString::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
|
@ -98,13 +98,13 @@ public:
|
||||
|
||||
bool tryInsert(const Field & x) override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src_, size_t index) override;
|
||||
#else
|
||||
void doInsertFrom(const IColumn & src_, size_t index) override;
|
||||
#endif
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertManyFrom(const IColumn & src, size_t position, size_t length) override;
|
||||
#else
|
||||
void doInsertManyFrom(const IColumn & src, size_t position, size_t length) override;
|
||||
@ -137,7 +137,7 @@ public:
|
||||
|
||||
void updateHashFast(SipHash & hash) const override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t p1, size_t p2, const IColumn & rhs_, int /*nan_direction_hint*/) const override
|
||||
#else
|
||||
int doCompareAt(size_t p1, size_t p2, const IColumn & rhs_, int /*nan_direction_hint*/) const override
|
||||
@ -156,7 +156,7 @@ public:
|
||||
|
||||
size_t estimateCardinalityInPermutedRange(const Permutation & permutation, const EqualRange & equal_range) const override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
|
@ -72,7 +72,7 @@ ColumnPtr ColumnFunction::cut(size_t start, size_t length) const
|
||||
return ColumnFunction::create(length, function, capture, is_short_circuit_argument, is_function_compiled);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnFunction::insertFrom(const IColumn & src, size_t n)
|
||||
#else
|
||||
void ColumnFunction::doInsertFrom(const IColumn & src, size_t n)
|
||||
@ -93,7 +93,7 @@ void ColumnFunction::doInsertFrom(const IColumn & src, size_t n)
|
||||
++elements_size;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnFunction::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnFunction::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
|
@ -94,12 +94,12 @@ public:
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Cannot insert into {}", getName());
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src, size_t n) override;
|
||||
#else
|
||||
void doInsertFrom(const IColumn & src, size_t n) override;
|
||||
#endif
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn &, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn &, size_t start, size_t length) override;
|
||||
@ -145,7 +145,7 @@ public:
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "popBack is not implemented for {}", getName());
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t, size_t, const IColumn &, int) const override
|
||||
#else
|
||||
int doCompareAt(size_t, size_t, const IColumn &, int) const override
|
||||
|
@ -159,7 +159,7 @@ void ColumnLowCardinality::insertDefault()
|
||||
idx.insertPosition(getDictionary().getDefaultValueIndex());
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnLowCardinality::insertFrom(const IColumn & src, size_t n)
|
||||
#else
|
||||
void ColumnLowCardinality::doInsertFrom(const IColumn & src, size_t n)
|
||||
@ -191,7 +191,7 @@ void ColumnLowCardinality::insertFromFullColumn(const IColumn & src, size_t n)
|
||||
idx.insertPosition(getDictionary().uniqueInsertFrom(src, n));
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnLowCardinality::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnLowCardinality::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
@ -372,7 +372,7 @@ int ColumnLowCardinality::compareAtImpl(size_t n, size_t m, const IColumn & rhs,
|
||||
return getDictionary().compareAt(n_index, m_index, low_cardinality_column.getDictionary(), nan_direction_hint);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnLowCardinality::compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
#else
|
||||
int ColumnLowCardinality::doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
|
@ -78,14 +78,14 @@ public:
|
||||
bool tryInsert(const Field & x) override;
|
||||
void insertDefault() override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src, size_t n) override;
|
||||
#else
|
||||
void doInsertFrom(const IColumn & src, size_t n) override;
|
||||
#endif
|
||||
void insertFromFullColumn(const IColumn & src, size_t n);
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
@ -135,7 +135,7 @@ public:
|
||||
return ColumnLowCardinality::create(dictionary.getColumnUniquePtr(), getIndexes().index(indexes_, limit));
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
|
@ -153,7 +153,7 @@ void ColumnMap::updateHashFast(SipHash & hash) const
|
||||
nested->updateHashFast(hash);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnMap::insertFrom(const IColumn & src, size_t n)
|
||||
#else
|
||||
void ColumnMap::doInsertFrom(const IColumn & src, size_t n)
|
||||
@ -162,7 +162,7 @@ void ColumnMap::doInsertFrom(const IColumn & src, size_t n)
|
||||
nested->insertFrom(assert_cast<const ColumnMap &>(src).getNestedColumn(), n);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnMap::insertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
#else
|
||||
void ColumnMap::doInsertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
@ -171,7 +171,7 @@ void ColumnMap::doInsertManyFrom(const IColumn & src, size_t position, size_t le
|
||||
assert_cast<ColumnArray &>(*nested).insertManyFrom(assert_cast<const ColumnMap &>(src).getNestedColumn(), position, length);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnMap::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnMap::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
@ -222,7 +222,7 @@ MutableColumns ColumnMap::scatter(ColumnIndex num_columns, const Selector & sele
|
||||
return res;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnMap::compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
#else
|
||||
int ColumnMap::doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
void updateWeakHash32(WeakHash32 & hash) const override;
|
||||
void updateHashFast(SipHash & hash) const override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src_, size_t n) override;
|
||||
void insertManyFrom(const IColumn & src, size_t position, size_t length) override;
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
@ -83,7 +83,7 @@ public:
|
||||
ColumnPtr index(const IColumn & indexes, size_t limit) const override;
|
||||
ColumnPtr replicate(const Offsets & offsets) const override;
|
||||
MutableColumns scatter(ColumnIndex num_columns, const Selector & selector) const override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
|
@ -221,7 +221,7 @@ const char * ColumnNullable::skipSerializedInArena(const char * pos) const
|
||||
return pos;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnNullable::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnNullable::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
@ -262,7 +262,7 @@ bool ColumnNullable::tryInsert(const Field & x)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnNullable::insertFrom(const IColumn & src, size_t n)
|
||||
#else
|
||||
void ColumnNullable::doInsertFrom(const IColumn & src, size_t n)
|
||||
@ -274,7 +274,7 @@ void ColumnNullable::doInsertFrom(const IColumn & src, size_t n)
|
||||
}
|
||||
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnNullable::insertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
#else
|
||||
void ColumnNullable::doInsertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
@ -414,7 +414,7 @@ int ColumnNullable::compareAtImpl(size_t n, size_t m, const IColumn & rhs_, int
|
||||
return getNestedColumn().compareAt(n, m, nested_rhs, null_direction_hint);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnNullable::compareAt(size_t n, size_t m, const IColumn & rhs_, int null_direction_hint) const
|
||||
#else
|
||||
int ColumnNullable::doCompareAt(size_t n, size_t m, const IColumn & rhs_, int null_direction_hint) const
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
char * serializeValueIntoMemory(size_t n, char * memory) const override;
|
||||
const char * deserializeAndInsertFromArena(const char * pos) override;
|
||||
const char * skipSerializedInArena(const char * pos) const override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
@ -77,7 +77,7 @@ public:
|
||||
void insert(const Field & x) override;
|
||||
bool tryInsert(const Field & x) override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src, size_t n) override;
|
||||
void insertManyFrom(const IColumn & src, size_t position, size_t length) override;
|
||||
#else
|
||||
@ -100,7 +100,7 @@ public:
|
||||
void expand(const Filter & mask, bool inverted) override;
|
||||
ColumnPtr permute(const Permutation & perm, size_t limit) const override;
|
||||
ColumnPtr index(const IColumn & indexes, size_t limit) const override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs_, int null_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs_, int null_direction_hint) const override;
|
||||
|
@ -763,7 +763,7 @@ void ColumnObject::get(size_t n, Field & res) const
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnObject::insertFrom(const IColumn & src, size_t n)
|
||||
#else
|
||||
void ColumnObject::doInsertFrom(const IColumn & src, size_t n)
|
||||
@ -772,7 +772,7 @@ void ColumnObject::doInsertFrom(const IColumn & src, size_t n)
|
||||
insert(src[n]);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnObject::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnObject::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
|
@ -210,7 +210,7 @@ public:
|
||||
bool tryInsert(const Field & field) override;
|
||||
void insertDefault() override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src, size_t n) override;
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
@ -235,7 +235,7 @@ public:
|
||||
/// Order of rows in ColumnObject is undefined.
|
||||
void getPermutation(PermutationSortDirection, PermutationSortStability, size_t, int, Permutation & res) const override;
|
||||
void updatePermutation(PermutationSortDirection, PermutationSortStability, size_t, int, Permutation &, EqualRanges &) const override {}
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t, size_t, const IColumn &, int) const override { return 0; }
|
||||
#else
|
||||
int doCompareAt(size_t, size_t, const IColumn &, int) const override { return 0; }
|
||||
|
@ -174,7 +174,7 @@ const char * ColumnSparse::skipSerializedInArena(const char * pos) const
|
||||
return values->skipSerializedInArena(pos);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnSparse::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnSparse::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
@ -252,7 +252,7 @@ bool ColumnSparse::tryInsert(const Field & x)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnSparse::insertFrom(const IColumn & src, size_t n)
|
||||
#else
|
||||
void ColumnSparse::doInsertFrom(const IColumn & src, size_t n)
|
||||
@ -454,7 +454,7 @@ ColumnPtr ColumnSparse::indexImpl(const PaddedPODArray<Type> & indexes, size_t l
|
||||
return ColumnSparse::create(std::move(res_values), std::move(res_offsets), limit);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnSparse::compareAt(size_t n, size_t m, const IColumn & rhs_, int null_direction_hint) const
|
||||
#else
|
||||
int ColumnSparse::doCompareAt(size_t n, size_t m, const IColumn & rhs_, int null_direction_hint) const
|
||||
|
@ -81,14 +81,14 @@ public:
|
||||
char * serializeValueIntoMemory(size_t n, char * memory) const override;
|
||||
const char * deserializeAndInsertFromArena(const char * pos) override;
|
||||
const char * skipSerializedInArena(const char *) const override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#endif
|
||||
void insert(const Field & x) override;
|
||||
bool tryInsert(const Field & x) override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src, size_t n) override;
|
||||
#else
|
||||
void doInsertFrom(const IColumn & src, size_t n) override;
|
||||
@ -106,7 +106,7 @@ public:
|
||||
template <typename Type>
|
||||
ColumnPtr indexImpl(const PaddedPODArray<Type> & indexes, size_t limit) const;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs_, int null_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs_, int null_direction_hint) const override;
|
||||
|
@ -39,7 +39,7 @@ ColumnString::ColumnString(const ColumnString & src)
|
||||
last_offset, chars.size());
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnString::insertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
#else
|
||||
void ColumnString::doInsertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
@ -133,7 +133,7 @@ void ColumnString::updateWeakHash32(WeakHash32 & hash) const
|
||||
}
|
||||
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnString::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnString::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
|
@ -142,7 +142,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src_, size_t n) override
|
||||
#else
|
||||
void doInsertFrom(const IColumn & src_, size_t n) override
|
||||
@ -169,7 +169,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertManyFrom(const IColumn & src, size_t position, size_t length) override;
|
||||
#else
|
||||
void doInsertManyFrom(const IColumn & src, size_t position, size_t length) override;
|
||||
@ -220,7 +220,7 @@ public:
|
||||
hash.update(reinterpret_cast<const char *>(chars.data()), chars.size() * sizeof(chars[0]));
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
@ -250,7 +250,7 @@ public:
|
||||
offsets.push_back(offsets.back() + 1);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs_, int /*nan_direction_hint*/) const override
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs_, int /*nan_direction_hint*/) const override
|
||||
|
@ -205,7 +205,7 @@ bool ColumnTuple::tryInsert(const Field & x)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnTuple::insertFrom(const IColumn & src_, size_t n)
|
||||
#else
|
||||
void ColumnTuple::doInsertFrom(const IColumn & src_, size_t n)
|
||||
@ -222,7 +222,7 @@ void ColumnTuple::doInsertFrom(const IColumn & src_, size_t n)
|
||||
columns[i]->insertFrom(*src.columns[i], n);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnTuple::insertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
#else
|
||||
void ColumnTuple::doInsertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
@ -326,7 +326,7 @@ void ColumnTuple::updateHashFast(SipHash & hash) const
|
||||
column->updateHashFast(hash);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnTuple::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnTuple::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
@ -482,7 +482,7 @@ int ColumnTuple::compareAtImpl(size_t n, size_t m, const IColumn & rhs, int nan_
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnTuple::compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
#else
|
||||
int ColumnTuple::doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
void insert(const Field & x) override;
|
||||
bool tryInsert(const Field & x) override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src_, size_t n) override;
|
||||
void insertManyFrom(const IColumn & src, size_t position, size_t length) override;
|
||||
#else
|
||||
@ -83,7 +83,7 @@ public:
|
||||
void updateHashWithValue(size_t n, SipHash & hash) const override;
|
||||
void updateWeakHash32(WeakHash32 & hash) const override;
|
||||
void updateHashFast(SipHash & hash) const override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
@ -94,7 +94,7 @@ public:
|
||||
ColumnPtr index(const IColumn & indexes, size_t limit) const override;
|
||||
ColumnPtr replicate(const Offsets & offsets) const override;
|
||||
MutableColumns scatter(ColumnIndex num_columns, const Selector & selector) const override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
return getNestedColumn()->updateHashWithValue(n, hash_func);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
@ -492,7 +492,7 @@ const char * ColumnUnique<ColumnType>::skipSerializedInArena(const char *) const
|
||||
}
|
||||
|
||||
template <typename ColumnType>
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnUnique<ColumnType>::compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
#else
|
||||
int ColumnUnique<ColumnType>::doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
|
@ -595,7 +595,7 @@ void ColumnVariant::insertManyFromImpl(const DB::IColumn & src_, size_t position
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnVariant::insertFrom(const IColumn & src_, size_t n)
|
||||
#else
|
||||
void ColumnVariant::doInsertFrom(const IColumn & src_, size_t n)
|
||||
@ -604,7 +604,7 @@ void ColumnVariant::doInsertFrom(const IColumn & src_, size_t n)
|
||||
insertFromImpl(src_, n, nullptr);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnVariant::insertRangeFrom(const IColumn & src_, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnVariant::doInsertRangeFrom(const IColumn & src_, size_t start, size_t length)
|
||||
@ -613,7 +613,7 @@ void ColumnVariant::doInsertRangeFrom(const IColumn & src_, size_t start, size_t
|
||||
insertRangeFromImpl(src_, start, length, nullptr);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnVariant::insertManyFrom(const DB::IColumn & src_, size_t position, size_t length)
|
||||
#else
|
||||
void ColumnVariant::doInsertManyFrom(const DB::IColumn & src_, size_t position, size_t length)
|
||||
@ -1186,7 +1186,7 @@ bool ColumnVariant::hasEqualValues() const
|
||||
return local_discriminators->hasEqualValues() && variants[localDiscriminatorAt(0)]->hasEqualValues();
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int ColumnVariant::compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
#else
|
||||
int ColumnVariant::doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
|
@ -180,7 +180,7 @@ public:
|
||||
void insert(const Field & x) override;
|
||||
bool tryInsert(const Field & x) override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src_, size_t n) override;
|
||||
void insertRangeFrom(const IColumn & src_, size_t start, size_t length) override;
|
||||
void insertManyFrom(const IColumn & src_, size_t position, size_t length) override;
|
||||
@ -223,7 +223,7 @@ public:
|
||||
ColumnPtr indexImpl(const PaddedPODArray<Type> & indexes, size_t limit) const;
|
||||
ColumnPtr replicate(const Offsets & replicate_offsets) const override;
|
||||
MutableColumns scatter(ColumnIndex num_columns, const Selector & selector) const override;
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const override;
|
||||
|
@ -503,7 +503,7 @@ bool ColumnVector<T>::tryInsert(const DB::Field & x)
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void ColumnVector<T>::insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
#else
|
||||
void ColumnVector<T>::doInsertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
return data.size();
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn & src, size_t n) override
|
||||
#else
|
||||
void doInsertFrom(const IColumn & src, size_t n) override
|
||||
@ -73,7 +73,7 @@ public:
|
||||
data.push_back(assert_cast<const Self &>(src).getData()[n]);
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertManyFrom(const IColumn & src, size_t position, size_t length) override
|
||||
#else
|
||||
void doInsertManyFrom(const IColumn & src, size_t position, size_t length) override
|
||||
@ -150,7 +150,7 @@ public:
|
||||
}
|
||||
|
||||
/// This method implemented in header because it could be possibly devirtualized.
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t n, size_t m, const IColumn & rhs_, int nan_direction_hint) const override
|
||||
#else
|
||||
int doCompareAt(size_t n, size_t m, const IColumn & rhs_, int nan_direction_hint) const override
|
||||
@ -240,7 +240,7 @@ public:
|
||||
|
||||
bool tryInsert(const DB::Field & x) override;
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
|
@ -46,7 +46,7 @@ String IColumn::dumpStructure() const
|
||||
return res.str();
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void IColumn::insertFrom(const IColumn & src, size_t n)
|
||||
#else
|
||||
void IColumn::doInsertFrom(const IColumn & src, size_t n)
|
||||
|
@ -179,7 +179,7 @@ public:
|
||||
|
||||
/// Appends n-th element from other column with the same type.
|
||||
/// Is used in merge-sort and merges. It could be implemented in inherited classes more optimally than default implementation.
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
virtual void insertFrom(const IColumn & src, size_t n);
|
||||
#else
|
||||
void insertFrom(const IColumn & src, size_t n)
|
||||
@ -191,7 +191,7 @@ public:
|
||||
|
||||
/// Appends range of elements from other column with the same type.
|
||||
/// Could be used to concatenate columns.
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
virtual void insertRangeFrom(const IColumn & src, size_t start, size_t length) = 0;
|
||||
#else
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length)
|
||||
@ -202,7 +202,7 @@ public:
|
||||
#endif
|
||||
|
||||
/// Appends one element from other column with the same type multiple times.
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
virtual void insertManyFrom(const IColumn & src, size_t position, size_t length)
|
||||
{
|
||||
for (size_t i = 0; i < length; ++i)
|
||||
@ -345,7 +345,7 @@ public:
|
||||
*
|
||||
* For non Nullable and non floating point types, nan_direction_hint is ignored.
|
||||
*/
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
[[nodiscard]] virtual int compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const = 0;
|
||||
#else
|
||||
[[nodiscard]] int compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
|
||||
@ -667,7 +667,7 @@ protected:
|
||||
Sort full_sort,
|
||||
PartialSort partial_sort) const;
|
||||
|
||||
#if defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
virtual void doInsertFrom(const IColumn & src, size_t n);
|
||||
|
||||
virtual void doInsertRangeFrom(const IColumn & src, size_t start, size_t length) = 0;
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
size_t byteSize() const override { return 0; }
|
||||
size_t byteSizeAt(size_t) const override { return 0; }
|
||||
size_t allocatedBytes() const override { return 0; }
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
int compareAt(size_t, size_t, const IColumn &, int) const override { return 0; }
|
||||
#else
|
||||
int doCompareAt(size_t, size_t, const IColumn &, int) const override { return 0; }
|
||||
@ -71,7 +71,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertFrom(const IColumn &, size_t) override
|
||||
#else
|
||||
void doInsertFrom(const IColumn &, size_t) override
|
||||
@ -80,7 +80,7 @@ public:
|
||||
++s;
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn & /*src*/, size_t /*start*/, size_t length) override
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn & /*src*/, size_t /*start*/, size_t length) override
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method tryInsert is not supported for ColumnUnique.");
|
||||
}
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
void insertRangeFrom(const IColumn &, size_t, size_t) override
|
||||
#else
|
||||
void doInsertRangeFrom(const IColumn &, size_t, size_t) override
|
||||
|
@ -52,7 +52,7 @@ static ColumnPtr mockColumn(const DataTypePtr & type, size_t rows)
|
||||
}
|
||||
|
||||
|
||||
#if !defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if !defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
static NO_INLINE void insertManyFrom(IColumn & dst, const IColumn & src)
|
||||
#else
|
||||
static NO_INLINE void doInsertManyFrom(IColumn & dst, const IColumn & src)
|
||||
|
@ -38,7 +38,7 @@ namespace
|
||||
std::erase_if(left_subkeys, [&](const String & key) { return ignore_keys->contains(key); });
|
||||
std::erase_if(right_subkeys, [&](const String & key) { return ignore_keys->contains(key); });
|
||||
|
||||
#if defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
/// Compound `ignore_keys` are not yet implemented.
|
||||
for (const auto & ignore_key : *ignore_keys)
|
||||
chassert(ignore_key.find('.') == std::string_view::npos);
|
||||
|
@ -192,7 +192,7 @@ void MemoryTracker::debugLogBigAllocationWithoutCheck(Int64 size [[maybe_unused]
|
||||
{
|
||||
/// Big allocations through allocNoThrow (without checking memory limits) may easily lead to OOM (and it's hard to debug).
|
||||
/// Let's find them.
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
if (size < 0)
|
||||
return;
|
||||
|
||||
|
@ -424,7 +424,7 @@ static void logUnexpectedSyscallError(std::string name)
|
||||
{
|
||||
std::string message = fmt::format("{} failed: {}", name, errnoToString());
|
||||
LOG_WARNING(&Poco::Logger::get("PageCache"), "{}", message);
|
||||
#if defined(ABORT_ON_LOGICAL_ERROR)
|
||||
#if defined(DEBUG_OR_SANITIZER_BUILD)
|
||||
volatile bool true_ = true;
|
||||
if (true_) // suppress warning about missing [[noreturn]]
|
||||
abortOnFailedAssertion(message);
|
||||
|
@ -25,7 +25,7 @@ namespace DB
|
||||
template <typename To, typename From>
|
||||
inline To assert_cast(From && from)
|
||||
{
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
try
|
||||
{
|
||||
if constexpr (std::is_pointer_v<To>)
|
||||
|
@ -166,7 +166,7 @@ TEST(Common, RWLockRecursive)
|
||||
|
||||
auto lock2 = fifo_lock->getLock(RWLockImpl::Read, "q2");
|
||||
|
||||
#ifndef ABORT_ON_LOGICAL_ERROR
|
||||
#ifndef DEBUG_OR_SANITIZER_BUILD
|
||||
/// It throws LOGICAL_ERROR
|
||||
EXPECT_ANY_THROW({fifo_lock->getLock(RWLockImpl::Write, "q2");});
|
||||
#endif
|
||||
|
@ -59,7 +59,7 @@ CachedOnDiskReadBufferFromFile::CachedOnDiskReadBufferFromFile(
|
||||
std::optional<size_t> read_until_position_,
|
||||
std::shared_ptr<FilesystemCacheLog> cache_log_)
|
||||
: ReadBufferFromFileBase(use_external_buffer_ ? 0 : settings_.remote_fs_buffer_size, nullptr, 0, file_size_)
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
, log(getLogger(fmt::format("CachedOnDiskReadBufferFromFile({})", cache_key_)))
|
||||
#else
|
||||
, log(getLogger("CachedOnDiskReadBufferFromFile"))
|
||||
@ -452,7 +452,7 @@ CachedOnDiskReadBufferFromFile::getImplementationBuffer(FileSegment & file_segme
|
||||
{
|
||||
case ReadType::CACHED:
|
||||
{
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
size_t file_size = getFileSizeFromReadBuffer(*read_buffer_for_file_segment);
|
||||
if (file_size == 0 || range.left + file_size <= file_offset_of_buffer_end)
|
||||
throw Exception(
|
||||
@ -937,7 +937,7 @@ bool CachedOnDiskReadBufferFromFile::nextImplStep()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
if (read_type == ReadType::CACHED)
|
||||
{
|
||||
size_t cache_file_size = getFileSizeFromReadBuffer(*implementation_buffer);
|
||||
|
@ -134,7 +134,7 @@ TEST(MemoryResizeTest, SmallInitAndBigResizeOverflowWhenPadding)
|
||||
ASSERT_EQ(memory.m_capacity, 0x8000000000000000ULL - 1);
|
||||
ASSERT_EQ(memory.m_size, 0x8000000000000000ULL - PADDING_FOR_SIMD);
|
||||
|
||||
#ifndef ABORT_ON_LOGICAL_ERROR
|
||||
#ifndef DEBUG_OR_SANITIZER_BUILD
|
||||
EXPECT_THROW_ERROR_CODE(memory.resize(0x8000000000000000ULL - (PADDING_FOR_SIMD - 1)), Exception, ErrorCodes::LOGICAL_ERROR);
|
||||
ASSERT_TRUE(memory.m_data); // state is intact after exception
|
||||
ASSERT_EQ(memory.m_capacity, 0x8000000000000000ULL - 1);
|
||||
@ -158,7 +158,7 @@ TEST(MemoryResizeTest, SmallInitAndBigResizeOverflowWhenPadding)
|
||||
ASSERT_EQ(memory.m_capacity, PADDING_FOR_SIMD);
|
||||
ASSERT_EQ(memory.m_size, 1);
|
||||
|
||||
#ifndef ABORT_ON_LOGICAL_ERROR
|
||||
#ifndef DEBUG_OR_SANITIZER_BUILD
|
||||
EXPECT_THROW_ERROR_CODE(memory.resize(0x8000000000000000ULL - (PADDING_FOR_SIMD - 1)), Exception, ErrorCodes::LOGICAL_ERROR);
|
||||
ASSERT_TRUE(memory.m_data); // state is intact after exception
|
||||
ASSERT_EQ(memory.m_capacity, PADDING_FOR_SIMD);
|
||||
@ -197,7 +197,7 @@ TEST(MemoryResizeTest, BigInitAndSmallResizeOverflowWhenPadding)
|
||||
, ErrorCodes::ARGUMENT_OUT_OF_BOUND);
|
||||
}
|
||||
|
||||
#ifndef ABORT_ON_LOGICAL_ERROR
|
||||
#ifndef DEBUG_OR_SANITIZER_BUILD
|
||||
{
|
||||
EXPECT_THROW_ERROR_CODE(
|
||||
{
|
||||
|
@ -917,8 +917,8 @@ TEST_P(SyncAsync, ExceptionOnUploadPart) {
|
||||
|
||||
|
||||
TEST_F(WBS3Test, PrefinalizeCalledMultipleTimes) {
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
GTEST_SKIP() << "this test trigger LOGICAL_ERROR, runs only if ABORT_ON_LOGICAL_ERROR is not defined";
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
GTEST_SKIP() << "this test trigger LOGICAL_ERROR, runs only if DEBUG_OR_SANITIZER_BUILD is not defined";
|
||||
#else
|
||||
EXPECT_THROW({
|
||||
try {
|
||||
|
@ -1007,7 +1007,7 @@ void FileCache::freeSpaceRatioKeepingThreadFunc()
|
||||
limits_satisfied = main_priority->collectCandidatesForEviction(
|
||||
desired_size, desired_elements_num, keep_up_free_space_remove_batch, stat, eviction_candidates, lock);
|
||||
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
/// Let's make sure that we correctly processed the limits.
|
||||
if (limits_satisfied && eviction_candidates.size() < keep_up_free_space_remove_batch)
|
||||
{
|
||||
@ -1110,7 +1110,7 @@ void FileCache::removeAllReleasable(const UserID & user_id)
|
||||
{
|
||||
assertInitialized();
|
||||
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
assertCacheCorrectness();
|
||||
#endif
|
||||
|
||||
@ -1226,7 +1226,7 @@ void FileCache::loadMetadataImpl()
|
||||
if (first_exception)
|
||||
std::rethrow_exception(first_exception);
|
||||
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
assertCacheCorrectness();
|
||||
#endif
|
||||
}
|
||||
@ -1393,7 +1393,7 @@ void FileCache::loadMetadataForKeys(const fs::path & keys_dir)
|
||||
FileCache::~FileCache()
|
||||
{
|
||||
deactivateBackgroundOperations();
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
assertCacheCorrectness();
|
||||
#endif
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ FileSegment::FileSegment(
|
||||
, key_metadata(key_metadata_)
|
||||
, queue_iterator(queue_iterator_)
|
||||
, cache(cache_)
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
, log(getLogger(fmt::format("FileSegment({}) : {}", key_.toString(), range().toString())))
|
||||
#else
|
||||
, log(getLogger("FileSegment"))
|
||||
@ -385,9 +385,9 @@ void FileSegment::write(char * from, size_t size, size_t offset_in_file)
|
||||
|
||||
try
|
||||
{
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
/// This mutex is only needed to have a valid assertion in assertCacheCorrectness(),
|
||||
/// which is only executed in debug/sanitizer builds (under ABORT_ON_LOGICAL_ERROR).
|
||||
/// which is only executed in debug/sanitizer builds (under DEBUG_OR_SANITIZER_BUILD).
|
||||
std::lock_guard lock(write_mutex);
|
||||
#endif
|
||||
|
||||
|
@ -963,7 +963,7 @@ KeyMetadata::iterator LockedKey::removeFileSegmentImpl(
|
||||
}
|
||||
else if (!can_be_broken)
|
||||
{
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Expected path {} to exist", path);
|
||||
#else
|
||||
LOG_WARNING(key_metadata->logger(), "Expected path {} to exist, while removing {}:{}",
|
||||
|
@ -538,7 +538,7 @@ Chunk DDLQueryStatusSource::generate()
|
||||
ExecutionStatus status(-1, "Cannot obtain error message");
|
||||
|
||||
/// Replicated database retries in case of error, it should not write error status.
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
bool need_check_status = true;
|
||||
#else
|
||||
bool need_check_status = !is_replicated_database;
|
||||
|
@ -50,7 +50,7 @@ TEST(Processors, PortsNotConnected)
|
||||
processors->emplace_back(std::move(source));
|
||||
processors->emplace_back(std::move(sink));
|
||||
|
||||
#ifndef ABORT_ON_LOGICAL_ERROR
|
||||
#ifndef DEBUG_OR_SANITIZER_BUILD
|
||||
try
|
||||
{
|
||||
QueryStatusPtr element;
|
||||
|
@ -133,7 +133,7 @@ TEST(CheckSortedTransform, CheckBadLastRow)
|
||||
EXPECT_NO_THROW(executor.pull(chunk));
|
||||
EXPECT_NO_THROW(executor.pull(chunk));
|
||||
|
||||
#ifndef ABORT_ON_LOGICAL_ERROR
|
||||
#ifndef DEBUG_OR_SANITIZER_BUILD
|
||||
EXPECT_THROW(executor.pull(chunk), DB::Exception);
|
||||
#endif
|
||||
}
|
||||
@ -158,7 +158,7 @@ TEST(CheckSortedTransform, CheckUnsortedBlock1)
|
||||
|
||||
Chunk chunk;
|
||||
|
||||
#ifndef ABORT_ON_LOGICAL_ERROR
|
||||
#ifndef DEBUG_OR_SANITIZER_BUILD
|
||||
EXPECT_THROW(executor.pull(chunk), DB::Exception);
|
||||
#endif
|
||||
}
|
||||
@ -181,7 +181,7 @@ TEST(CheckSortedTransform, CheckUnsortedBlock2)
|
||||
PullingPipelineExecutor executor(pipeline);
|
||||
|
||||
Chunk chunk;
|
||||
#ifndef ABORT_ON_LOGICAL_ERROR
|
||||
#ifndef DEBUG_OR_SANITIZER_BUILD
|
||||
EXPECT_THROW(executor.pull(chunk), DB::Exception);
|
||||
#endif
|
||||
}
|
||||
@ -204,7 +204,7 @@ TEST(CheckSortedTransform, CheckUnsortedBlock3)
|
||||
PullingPipelineExecutor executor(pipeline);
|
||||
|
||||
Chunk chunk;
|
||||
#ifndef ABORT_ON_LOGICAL_ERROR
|
||||
#ifndef DEBUG_OR_SANITIZER_BUILD
|
||||
EXPECT_THROW(executor.pull(chunk), DB::Exception);
|
||||
#endif
|
||||
}
|
||||
|
@ -666,7 +666,7 @@ void TCPHandler::runImpl()
|
||||
// Server should die on std logic errors in debug, like with assert()
|
||||
// or ErrorCodes::LOGICAL_ERROR. This helps catch these errors in
|
||||
// tests.
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
catch (const std::logic_error & e)
|
||||
{
|
||||
state.io.onException();
|
||||
|
@ -357,7 +357,7 @@ void RefreshTask::refreshTask()
|
||||
stop_requested = true;
|
||||
tryLogCurrentException(log,
|
||||
"Unexpected exception in refresh scheduling, please investigate. The view will be stopped.");
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
abortOnFailedAssertion("Unexpected exception in refresh scheduling");
|
||||
#endif
|
||||
}
|
||||
|
@ -1516,7 +1516,7 @@ static time_t tryGetPartCreateTime(zkutil::ZooKeeperPtr & zookeeper, const Strin
|
||||
|
||||
void StorageReplicatedMergeTree::paranoidCheckForCoveredPartsInZooKeeperOnStart(const Strings & parts_in_zk, const Strings & parts_to_fetch) const
|
||||
{
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
constexpr bool paranoid_check_for_covered_parts_default = true;
|
||||
#else
|
||||
constexpr bool paranoid_check_for_covered_parts_default = false;
|
||||
@ -2383,7 +2383,7 @@ static void paranoidCheckForCoveredPartsInZooKeeper(
|
||||
const String & covering_part_name,
|
||||
const StorageReplicatedMergeTree & storage)
|
||||
{
|
||||
#ifdef ABORT_ON_LOGICAL_ERROR
|
||||
#ifdef DEBUG_OR_SANITIZER_BUILD
|
||||
constexpr bool paranoid_check_for_covered_parts_default = true;
|
||||
#else
|
||||
constexpr bool paranoid_check_for_covered_parts_default = false;
|
||||
|
Loading…
Reference in New Issue
Block a user