This is an automated email from the ASF dual-hosted git repository.

yiguolei 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 6cc5ae077e [Improvement](Sequence function) Capitalize const variables 
(#14270)
6cc5ae077e is described below

commit 6cc5ae077e7cc43398e6850c14ed368149852ec7
Author: abmdocrt <yukang.lian2...@gmail.com>
AuthorDate: Tue Nov 15 10:41:53 2022 +0800

    [Improvement](Sequence function) Capitalize const variables (#14270)
---
 .../aggregate_functions/aggregate_function_sequence_match.cpp  |  4 ++--
 .../aggregate_functions/aggregate_function_sequence_match.h    | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp 
b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp
index 91c65fd188..61685f69ba 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp
@@ -35,9 +35,9 @@ AggregateFunctionPtr 
create_aggregate_function_sequence_base(const std::string&
         LOG(WARNING) << "Aggregate function " + name + " requires at least 4 
arguments.";
         return nullptr;
     }
-    if (arg_count - 2 > max_events) {
+    if (arg_count - 2 > MAX_EVENTS) {
         LOG(WARNING) << "Aggregate function " + name + " supports up to " +
-                                std::to_string(max_events) + " event 
arguments.";
+                                std::to_string(MAX_EVENTS) + " event 
arguments.";
         return nullptr;
     }
 
diff --git a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h 
b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h
index df383d199d..6841e055af 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h
@@ -41,15 +41,15 @@ struct ComparePairFirst final {
     }
 };
 
-static constexpr size_t max_events = 32;
+static constexpr size_t MAX_EVENTS = 32;
 
 /// Max number of iterations to match the pattern against a sequence, 
exception thrown when exceeded
-constexpr auto sequence_match_max_iterations = 1000000;
+constexpr auto sequence_match_max_iterations = 1000000l;
 
 template <typename DateValueType, typename NativeType, typename Derived>
 struct AggregateFunctionSequenceMatchData final {
     using Timestamp = DateValueType;
-    using Events = std::bitset<max_events>;
+    using Events = std::bitset<MAX_EVENTS>;
     using TimestampEvents = std::pair<Timestamp, Events>;
     using Comparator = ComparePairFirst<std::less>;
 
@@ -542,9 +542,9 @@ public:
     bool sorted = true;
     PODArrayWithStackMemory<TimestampEvents, 64> events_list;
     // sequenceMatch conditions met at least once in events_list
-    std::bitset<max_events> conditions_met;
+    std::bitset<MAX_EVENTS> conditions_met;
     // sequenceMatch conditions met at least once in the pattern
-    std::bitset<max_events> conditions_in_pattern;
+    std::bitset<MAX_EVENTS> conditions_in_pattern;
     // `True` if the parsed pattern contains time assertions (?t...), `false` 
otherwise.
     bool pattern_has_time;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to