From ee32e47073ffaf4133b737dc23f22c977f6179c2 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Thu, 30 Jun 2016 22:44:01 +0400 Subject: [PATCH] =?UTF-8?q?Revert=20"dbms:=20Server:=20Use=20PODArray=20in?= =?UTF-8?q?stead=20of=20std::vector=20in=20sequenceMatch/Co=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AggregateFunctionSequenceMatch.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/dbms/include/DB/AggregateFunctions/AggregateFunctionSequenceMatch.h b/dbms/include/DB/AggregateFunctions/AggregateFunctionSequenceMatch.h index 1c16f190cd..feca1d0b4f 100644 --- a/dbms/include/DB/AggregateFunctions/AggregateFunctionSequenceMatch.h +++ b/dbms/include/DB/AggregateFunctions/AggregateFunctionSequenceMatch.h @@ -8,7 +8,6 @@ #include #include #include -#include #include #include @@ -45,8 +44,7 @@ struct AggregateFunctionSequenceMatchData final using Comparator = ComparePairFirst; bool sorted = true; - static constexpr size_t bytes_in_arena = 64; - PODArray, bytes_in_arena>> eventsList; + std::vector eventsList; void add(const Timestamp timestamp, const Events & events) { @@ -62,7 +60,7 @@ struct AggregateFunctionSequenceMatchData final { const auto size = eventsList.size(); - eventsList.insert(std::begin(other.eventsList), std::end(other.eventsList)); + eventsList.insert(std::end(eventsList), std::begin(other.eventsList), std::end(other.eventsList)); /// either sort whole container or do so partially merging ranges afterwards if (!sorted && !other.sorted) @@ -264,14 +262,14 @@ private: PatternAction(const PatternActionType type, const std::uint32_t extra = 0) : type{type}, extra{extra} {} }; - static constexpr size_t bytes_on_stack = 64; - using PatternActions = PODArray, bytes_on_stack>>; + using PatternActions = std::vector; void parsePattern() { - PatternActions actions; - actions.emplace_back(PatternActionType::KleeneStar); + PatternActions actions{ + { PatternActionType::KleeneStar } + }; ParserString special_open_p("(?"); ParserString special_close_p(")"); -- GitLab