diff --git a/be/src/vec/functions/function_jsonb.cpp b/be/src/vec/functions/function_jsonb.cpp index a33cad13623beea..97a8db84b1fc3d0 100644 --- a/be/src/vec/functions/function_jsonb.cpp +++ b/be/src/vec/functions/function_jsonb.cpp @@ -1159,7 +1159,7 @@ class FunctionJsonbContains : public IFunction { static FunctionPtr create() { return std::make_shared>(); } DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { - return make_nullable(std::make_shared()); + return std::make_shared(); } DataTypes get_variadic_argument_types_impl() const override { return Impl::get_variadic_argument_types(); @@ -1168,8 +1168,6 @@ class FunctionJsonbContains : public IFunction { return get_variadic_argument_types_impl().size(); } - bool use_default_implementation_for_nulls() const override { return false; } - Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, size_t result, size_t input_rows_count) const override { return Impl::execute_impl(context, block, arguments, result, input_rows_count); @@ -1245,8 +1243,7 @@ struct JsonbContainsUtil { res->insert_data(const_cast((char*)&contains_value), 0); } - block.replace_by_position(result, - ColumnNullable::create(std::move(res), std::move(null_map))); + block.replace_by_position(result, std::move(res)); return Status::OK(); } }; @@ -1296,13 +1293,11 @@ class FunctionJsonbDepth : public IFunction { static FunctionPtr create() { return std::make_shared(); } DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { - return make_nullable(std::make_shared()); + return std::make_shared(); } size_t get_number_of_arguments() const override { return 1; } - bool use_default_implementation_for_nulls() const override { return false; } - Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, size_t result, size_t input_rows_count) const override { DCHECK_GE(arguments.size(), 1); @@ -1333,8 +1328,7 @@ class FunctionJsonbDepth : public IFunction { res_data[i] = value->depth(); } - block.replace_by_position( - result, ColumnNullable::create(std::move(col_result), std::move(null_map))); + block.replace_by_position(result, std::move(col_result)); return Status::OK(); } };