amorynan commented on code in PR #31828:
URL: https://github.com/apache/doris/pull/31828#discussion_r1519131053
##########
be/src/vec/functions/function_collection_in.h:
##########
@@ -98,14 +98,17 @@ class FunctionStructIn : public IFunction {
if (scope == FunctionContext::THREAD_LOCAL) {
return Status::OK();
}
- std::shared_ptr<StructInState> state =
std::make_shared<StructInState>();
+ int num_args = context->get_num_args();
+ DCHECK(num_args >= 1);
+
+ std::shared_ptr<CollectionInState> state =
std::make_shared<CollectionInState>();
context->set_function_state(scope, state);
- DCHECK(context->get_num_args() >= 1);
+
auto* col_desc = context->get_arg_type(0);
- DataTypePtr args_type =
DataTypeFactory::instance().create_data_type(*col_desc);
- MutableColumnPtr column_struct_ptr_args =
remove_nullable(args_type)->create_column();
- NullMap null_map(context->get_num_args(), false);
- for (int i = 1; i < context->get_num_args(); ++i) {
+ DataTypePtr args_type =
DataTypeFactory::instance().create_data_type(*col_desc, false);
+ MutableColumnPtr args_column_ptr =
remove_nullable(args_type)->create_column();
Review Comment:
create_data_type(*col_desc, false); u set false already , there is no need
to remove_nullable again
--
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]