You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by xu...@apache.org on 2022/07/30 06:15:18 UTC

[doris] branch master updated: [FIX]DCHECK error of array functions (#11335)

This is an automated email from the ASF dual-hosted git repository.

xuyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 0497d58943 [FIX]DCHECK error of array functions (#11335)
0497d58943 is described below

commit 0497d58943df31408340e22b1752dbd53877a73a
Author: starocean999 <40...@users.noreply.github.com>
AuthorDate: Sat Jul 30 14:15:13 2022 +0800

    [FIX]DCHECK error of array functions (#11335)
---
 be/src/vec/functions/array/function_array_binary.h   | 6 +++++-
 be/src/vec/functions/array/function_arrays_overlap.h | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/be/src/vec/functions/array/function_array_binary.h b/be/src/vec/functions/array/function_array_binary.h
index 299d1959b4..152ed7c5ec 100644
--- a/be/src/vec/functions/array/function_array_binary.h
+++ b/be/src/vec/functions/array/function_array_binary.h
@@ -39,7 +39,11 @@ public:
     DataTypePtr get_return_type_impl(const DataTypes& arguments) const override {
         DCHECK(is_array(arguments[0])) << arguments[0]->get_name();
         DCHECK(is_array(arguments[1])) << arguments[1]->get_name();
-        DCHECK(arguments[0]->equals(*arguments[1]))
+        auto left_nested_type = remove_nullable(
+                assert_cast<const DataTypeArray&>(*(arguments[0])).get_nested_type());
+        auto right_nested_type = remove_nullable(
+                assert_cast<const DataTypeArray&>(*(arguments[1])).get_nested_type());
+        DCHECK(left_nested_type->equals(*right_nested_type))
                 << "data type " << arguments[0]->get_name() << " not equal with "
                 << arguments[1]->get_name();
         return Impl::get_return_type(arguments);
diff --git a/be/src/vec/functions/array/function_arrays_overlap.h b/be/src/vec/functions/array/function_arrays_overlap.h
index b1e10449fa..72a33e4240 100644
--- a/be/src/vec/functions/array/function_arrays_overlap.h
+++ b/be/src/vec/functions/array/function_arrays_overlap.h
@@ -89,7 +89,11 @@ public:
         auto right_data_type = remove_nullable(arguments[1]);
         DCHECK(is_array(left_data_type)) << arguments[0]->get_name();
         DCHECK(is_array(right_data_type)) << arguments[1]->get_name();
-        DCHECK(left_data_type->equals(*right_data_type))
+        auto left_nested_type = remove_nullable(
+                assert_cast<const DataTypeArray&>(*left_data_type).get_nested_type());
+        auto right_nested_type = remove_nullable(
+                assert_cast<const DataTypeArray&>(*right_data_type).get_nested_type());
+        DCHECK(left_nested_type->equals(*right_nested_type))
                 << "data type " << arguments[0]->get_name() << " not equal with "
                 << arguments[1]->get_name();
         return make_nullable(std::make_shared<DataTypeUInt8>());


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