amorynan commented on code in PR #32620:
URL: https://github.com/apache/doris/pull/32620#discussion_r1555176972


##########
be/src/vec/functions/array/function_array_index.h:
##########
@@ -87,6 +96,61 @@ class FunctionArrayIndex : public IFunction {
 
     bool use_default_implementation_for_nulls() const override { return false; 
}
 
+    Status open(FunctionContext* context, FunctionContext::FunctionStateScope 
scope) override {
+        if (scope == FunctionContext::THREAD_LOCAL) {
+            return Status::OK();
+        }
+
+        DCHECK(context->get_num_args() >= 1);
+        DCHECK(context->get_arg_type(0)->is_array_type());
+        // now we only support same
+        std::shared_ptr<ParamValue> state = std::make_shared<ParamValue>();
+        Field field;
+        context->get_constant_col(1)->column_ptr->get(0, field);
+        if (field.is_null()) {

Review Comment:
   make a isvalid to avoid return error



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to