@@ -1138,7 +1138,7 @@ std::vector<std::string> allNames(
11381138 const std::vector<std::string>& names,
11391139 const std::vector<std::string>& moreNames) {
11401140 auto result = names;
1141- result.insert (result.end (), moreNames.begin (), moreNames.end ());
1141+ result.insert (result.cend (), moreNames.cbegin (), moreNames.cend ());
11421142 return result;
11431143}
11441144
@@ -1150,7 +1150,7 @@ std::vector<TypedExprPtr> flattenExprs(
11501150 const PlanNodePtr& input) {
11511151 std::vector<TypedExprPtr> result;
11521152 for (auto & group : exprs) {
1153- result.insert (result.end (), group.begin (), group.end ());
1153+ result.insert (result.cend (), group.cbegin (), group.cend ());
11541154 }
11551155
11561156 const auto & sourceType = input->outputType ();
@@ -2502,7 +2502,7 @@ const char* TopNRowNumberNode::rankFunctionName(
25022502 static const auto kFunctionNames = rankFunctionNames ();
25032503 auto it = kFunctionNames .find (function);
25042504 VELOX_CHECK (
2505- it != kFunctionNames .end (),
2505+ it != kFunctionNames .cend (),
25062506 " Invalid rank function {}" ,
25072507 static_cast <int >(function));
25082508 return it->second .c_str ();
@@ -2513,7 +2513,7 @@ TopNRowNumberNode::RankFunction TopNRowNumberNode::rankFunctionFromName(
25132513 std::string_view name) {
25142514 static const auto kFunctionNames = invertMap (rankFunctionNames ());
25152515 auto it = kFunctionNames .find (name.data ());
2516- VELOX_CHECK (it != kFunctionNames .end (), " Invalid rank function {}" , name);
2516+ VELOX_CHECK (it != kFunctionNames .cend (), " Invalid rank function {}" , name);
25172517 return it->second ;
25182518}
25192519
0 commit comments