From dae9bf3dd3b9809e40e413e66d62193388a6c8e1 Mon Sep 17 00:00:00 2001 From: LemonLiTree Date: Thu, 18 Apr 2024 11:47:05 +0800 Subject: [PATCH] fix --- be/src/vec/functions/function_jsonb.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/be/src/vec/functions/function_jsonb.cpp b/be/src/vec/functions/function_jsonb.cpp index 9a1716136b0700f..1e53a3581714041 100644 --- a/be/src/vec/functions/function_jsonb.cpp +++ b/be/src/vec/functions/function_jsonb.cpp @@ -1158,7 +1158,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(); @@ -1167,8 +1167,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); @@ -1244,8 +1242,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(); } }; @@ -1295,13 +1292,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); @@ -1332,8 +1327,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(); } };