eldenmoon commented on code in PR #20294:
URL: https://github.com/apache/doris/pull/20294#discussion_r1212512384
##########
be/src/vec/functions/array/function_array_lambda_index.cpp:
##########
@@ -45,11 +45,12 @@ class FunctionContext;
namespace doris::vectorized {
// array_first_index([0, 1, 0]) -> [2]
Review Comment:
add `array_last_index` annotation like `array_first_index`
##########
be/src/vec/functions/array/function_array_lambda_index.cpp:
##########
@@ -45,11 +45,12 @@ class FunctionContext;
namespace doris::vectorized {
// array_first_index([0, 1, 0]) -> [2]
-class FunctionArrayFirstIndex : public IFunction {
+template <bool first>
+class FunctionArrayLambdaIndex : public IFunction {
public:
Review Comment:
if this class is just for `array_first_index` `array_last_index`, so i think
this class could be renamed to `FunctionArrayFirstOrLastIndex` is better? Or
we need some enum
##########
be/src/vec/functions/array/function_array_lambda_index.cpp:
##########
@@ -88,10 +89,21 @@ class FunctionArrayFirstIndex : public IFunction {
// default index is 0 if such index is not found
size_t first_index = 0;
Review Comment:
rename first_index -> dst_index
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]