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

zclll 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 56c34a1c3ad [fix](function)Fix array_apply being unable to handle 
LARGEINT. (#61081)
56c34a1c3ad is described below

commit 56c34a1c3ad6f6ceaf4a5ab99b7cf74e62c933c4
Author: Mryange <[email protected]>
AuthorDate: Fri Mar 6 15:24:39 2026 +0800

    [fix](function)Fix array_apply being unable to handle LARGEINT. (#61081)
    
    ```sql
    mysql> SELECT array_apply(int_array, '>', 2) FROM fn_test_nullsafe_array 
order by id;
    ERROR 1105 (HY000): errCode = 2, detailMessage = 
(127.0.0.1)[INVALID_ARGUMENT][E33] array_apply only accept array with nested 
type which is uint/int/decimal/float/date but got : Nullable(LARGEINT)
    ```
    
    now
    ```sql
    mysql> SELECT array_apply(int_array, '>', 2) FROM fn_test_nullsafe_array 
order by id;
    +--------------------------------+
    | array_apply(int_array, '>', 2) |
    +--------------------------------+
    | [3, 4, 5]                      |
    | [3, 5]                         |
    | [3, 4]                         |
    | []                             |
    | NULL                           |
    +--------------------------------+
    ```
---
 .../vec/functions/array/function_array_apply.cpp   |  99 ++++--------
 .../data/doc/sql-manual/ArrayNullsafe.out          | 175 +++++++++++++++++++++
 .../suites/doc/sql-manual/ArrayNullsafe.groovy     |  38 ++++-
 3 files changed, 241 insertions(+), 71 deletions(-)

diff --git a/be/src/vec/functions/array/function_array_apply.cpp 
b/be/src/vec/functions/array/function_array_apply.cpp
index f5384170fc1..7aeea152b39 100644
--- a/be/src/vec/functions/array/function_array_apply.cpp
+++ b/be/src/vec/functions/array/function_array_apply.cpp
@@ -36,6 +36,7 @@
 #include "vec/common/assert_cast.h"
 #include "vec/common/string_ref.h"
 #include "vec/core/block.h"
+#include "vec/core/call_on_type_index.h"
 #include "vec/core/column_numbers.h"
 #include "vec/core/column_with_type_and_name.h"
 #include "vec/core/types.h"
@@ -171,79 +172,47 @@ private:
         return ColumnArray::create(filtered, std::move(column_offsets));
     }
 
-// need exception safety
-#define APPLY_ALL_TYPES(src_column, src_offsets, OP, cmp, dst)                 
               \
-    do {                                                                       
               \
-        switch (nested_type->get_primitive_type()) {                           
               \
-        case PrimitiveType::TYPE_BOOLEAN:                                      
               \
-            *dst = _apply_internal<UInt8, OP>(src_column, src_offsets, cmp);   
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_TINYINT:                                      
               \
-            *dst = _apply_internal<Int8, OP>(src_column, src_offsets, cmp);    
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_SMALLINT:                                     
               \
-            *dst = _apply_internal<Int16, OP>(src_column, src_offsets, cmp);   
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_INT:                                          
               \
-            *dst = _apply_internal<Int32, OP>(src_column, src_offsets, cmp);   
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_BIGINT:                                       
               \
-            *dst = _apply_internal<Int64, OP>(src_column, src_offsets, cmp);   
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_FLOAT:                                        
               \
-            *dst = _apply_internal<Float32, OP>(src_column, src_offsets, cmp); 
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_DOUBLE:                                       
               \
-            *dst = _apply_internal<Float64, OP>(src_column, src_offsets, cmp); 
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_DATEV2:                                       
               \
-            *dst = _apply_internal<UInt32, OP>(src_column, src_offsets, cmp);  
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_DATETIMEV2:                                   
               \
-            *dst = _apply_internal<UInt64, OP>(src_column, src_offsets, cmp);  
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_TIMESTAMPTZ:                                  
               \
-            *dst = _apply_internal<UInt64, OP>(src_column, src_offsets, cmp);  
               \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_DECIMAL32:                                    
               \
-            *dst = _apply_internal<Decimal32, OP>(src_column, src_offsets, 
cmp);              \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_DECIMAL64:                                    
               \
-            *dst = _apply_internal<Decimal64, OP>(src_column, src_offsets, 
cmp);              \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_DECIMALV2:                                    
               \
-            *dst = _apply_internal<Decimal128V2, OP>(src_column, src_offsets, 
cmp);           \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_DECIMAL128I:                                  
               \
-            *dst = _apply_internal<Decimal128V3, OP>(src_column, src_offsets, 
cmp);           \
-            break;                                                             
               \
-        case PrimitiveType::TYPE_DECIMAL256:                                   
               \
-            *dst = _apply_internal<Decimal256, OP>(src_column, src_offsets, 
cmp);             \
-            break;                                                             
               \
-        default:                                                               
               \
-            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,                
               \
-                                   "array_apply only accept array with nested 
type which is " \
-                                   "uint/int/decimal/float/date but got : " +  
               \
-                                           nested_type->get_name());           
               \
-        }                                                                      
               \
-    } while (0)
-
+    template <ApplyOp OP>
+    void dispatch_array_scalar(DataTypePtr nested_type, const IColumn& 
src_column,
+                               const ColumnArray::Offsets64& src_offsets, 
const ColumnConst& cmp,
+                               ColumnPtr* dst) const {
+        auto call = [&](const auto& type) -> bool {
+            using DispatchType = std::decay_t<decltype(type)>;
+            constexpr PrimitiveType PType = DispatchType::PType;
+            *dst = _apply_internal<typename 
PrimitiveTypeTraits<PType>::CppType, OP>(
+                    src_column, src_offsets, cmp);
+            return true;
+        };
+
+        if (!dispatch_switch_scalar(nested_type->get_primitive_type(), call)) {
+            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
+                                   "array_apply only accept array with nested 
type which is "
+                                   "uint/int/decimal/float/date but got : " +
+                                           nested_type->get_name());
+        }
+    }
     // need exception safety
     Status _execute(const IColumn& nested_src, DataTypePtr nested_type,
                     const ColumnArray::Offsets64& offsets, const std::string& 
condition,
                     const ColumnConst& rhs_value_column, ColumnPtr* dst) const 
{
         if (condition == "=") {
-            APPLY_ALL_TYPES(nested_src, offsets, ApplyOp::EQ, 
rhs_value_column, dst);
+            dispatch_array_scalar<ApplyOp::EQ>(nested_type, nested_src, 
offsets, rhs_value_column,
+                                               dst);
         } else if (condition == "!=") {
-            APPLY_ALL_TYPES(nested_src, offsets, ApplyOp::NE, 
rhs_value_column, dst);
-        } else if (condition == ">=") {
-            APPLY_ALL_TYPES(nested_src, offsets, ApplyOp::GE, 
rhs_value_column, dst);
-        } else if (condition == "<=") {
-            APPLY_ALL_TYPES(nested_src, offsets, ApplyOp::LE, 
rhs_value_column, dst);
+            dispatch_array_scalar<ApplyOp::NE>(nested_type, nested_src, 
offsets, rhs_value_column,
+                                               dst);
         } else if (condition == "<") {
-            APPLY_ALL_TYPES(nested_src, offsets, ApplyOp::LT, 
rhs_value_column, dst);
+            dispatch_array_scalar<ApplyOp::LT>(nested_type, nested_src, 
offsets, rhs_value_column,
+                                               dst);
+        } else if (condition == "<=") {
+            dispatch_array_scalar<ApplyOp::LE>(nested_type, nested_src, 
offsets, rhs_value_column,
+                                               dst);
         } else if (condition == ">") {
-            APPLY_ALL_TYPES(nested_src, offsets, ApplyOp::GT, 
rhs_value_column, dst);
+            dispatch_array_scalar<ApplyOp::GT>(nested_type, nested_src, 
offsets, rhs_value_column,
+                                               dst);
+        } else if (condition == ">=") {
+            dispatch_array_scalar<ApplyOp::GE>(nested_type, nested_src, 
offsets, rhs_value_column,
+                                               dst);
         } else {
             return Status::RuntimeError(
                     fmt::format("execute failed, unsupported op {} for 
function {})", condition,
diff --git a/regression-test/data/doc/sql-manual/ArrayNullsafe.out 
b/regression-test/data/doc/sql-manual/ArrayNullsafe.out
index 681d18859b4..03ab0ab9f74 100644
--- a/regression-test/data/doc/sql-manual/ArrayNullsafe.out
+++ b/regression-test/data/doc/sql-manual/ArrayNullsafe.out
@@ -13,6 +13,13 @@
 []
 \N
 
+-- !sql_array_apply3 --
+[170141183460469231731687303715884105727, 
170141183460469231731687303715884105726, 
170141183460469231731687303715884105725]
+[3, 5]
+[3, 4]
+[]
+\N
+
 -- !sql_array_compact4 --
 ["2023-01-01", "2023-01-02", "2023-01-03"]
 ["2023-01-01", null, "2023-01-03"]
@@ -34,6 +41,13 @@
 []
 \N
 
+-- !sql_array_compact7 --
+[170141183460469231731687303715884105727, 
170141183460469231731687303715884105726, 
170141183460469231731687303715884105725]
+[1, null, 3, null, 5]
+[1, 2, 3, 1, 4]
+[]
+\N
+
 -- !sql_array_concat1 --
 [1, 2, 3, 4, 5, 6, 7, 8]
 [1, null, 3, null, 5, 6, 7, 8]
@@ -55,6 +69,13 @@
 []
 \N
 
+-- !sql_array_concat4 --
+[170141183460469231731687303715884105727, 
170141183460469231731687303715884105726, 
170141183460469231731687303715884105725, 6, 7, 8]
+[1, null, 3, null, 5, 6, 7, 8]
+[1, 1, 2, 2, 2, 3, 1, 4, 6, 7, 8]
+[6, 7, 8]
+\N
+
 -- !sql_array_contains2 --
 true
 true
@@ -76,6 +97,20 @@ true
 false
 \N
 
+-- !sql_array_contains6 --
+false
+true
+true
+false
+\N
+
+-- !sql_array_contains7 --
+false
+true
+false
+false
+\N
+
 -- !sql_array_count1 --
 3
 2
@@ -97,6 +132,13 @@ false
 0
 0
 
+-- !sql_array_count4 --
+3
+2
+2
+0
+0
+
 -- !sql_array_cum_sum1 --
 [1, 3, 6, 10, 15]
 [1, 1, 4, 4, 9]
@@ -132,6 +174,13 @@ false
 []
 \N
 
+-- !sql_array_difference4 --
+[0, -1, -1]
+[0, null, null, null, null]
+[0, 0, 1, 0, 0, 1, -2, 3]
+[]
+\N
+
 -- !sql_array_distinct2 --
 ["a", "b", "c", "d", "e"]
 ["a", null, "c", "e"]
@@ -153,6 +202,13 @@ false
 []
 \N
 
+-- !sql_array_distinct5 --
+[170141183460469231731687303715884105727, 
170141183460469231731687303715884105726, 
170141183460469231731687303715884105725]
+[1, null, 3, 5]
+[1, 2, 3, 4]
+[]
+\N
+
 -- !sql_array_except1 --
 [1, 3, 5]
 [1, null, 3, 5]
@@ -181,6 +237,13 @@ false
 \N
 \N
 
+-- !sql_array_except5 --
+[170141183460469231731687303715884105727, 
170141183460469231731687303715884105726, 
170141183460469231731687303715884105725]
+[1, null, 3, 5]
+[1, 3]
+[]
+\N
+
 -- !sql_array_filter1 --
 [3, 4, 5]
 [3, 5]
@@ -216,6 +279,13 @@ false
 []
 \N
 
+-- !sql_array_filter6 --
+[170141183460469231731687303715884105727, 
170141183460469231731687303715884105726, 
170141183460469231731687303715884105725]
+[3, 5]
+[3, 4]
+[]
+\N
+
 -- !sql_array_enumerate_uniq1 --
 [1, 1, 1, 1, 1]
 [1, 1, 1, 2, 1]
@@ -244,6 +314,13 @@ false
 []
 \N
 
+-- !sql_array_enumerate_uniq5 --
+[1, 1, 1]
+[1, 1, 1, 2, 1]
+[1, 2, 1, 2, 3, 1, 3, 1]
+[]
+\N
+
 -- !sql_array_enumerate1 --
 [1, 2, 3, 4, 5]
 [1, 2, 3, 4, 5]
@@ -272,6 +349,13 @@ false
 []
 \N
 
+-- !sql_array_enumerate5 --
+[1, 2, 3]
+[1, 2, 3, 4, 5]
+[1, 2, 3, 4, 5, 6, 7, 8]
+[]
+\N
+
 -- !sql_array_exists1 --
 [0, 0, 0, 0, 0]
 [0, 1, 0, 1, 0]
@@ -314,6 +398,13 @@ false
 []
 \N
 
+-- !sql_array_exists7 --
+[0, 0, 0]
+[0, 1, 0, 1, 0]
+[0, 0, 0, 0, 0, 0, 0, 0]
+[]
+\N
+
 -- !sql_array_first1 --
 \N
 \N
@@ -356,6 +447,13 @@ false
 \N
 \N
 
+-- !sql_array_first7 --
+\N
+\N
+\N
+\N
+\N
+
 -- !sql_array_last1 --
 \N
 \N
@@ -398,6 +496,13 @@ false
 \N
 \N
 
+-- !sql_array_last7 --
+\N
+\N
+\N
+\N
+\N
+
 -- !sql_array_first_index1 --
 0
 2
@@ -440,6 +545,13 @@ false
 0
 0
 
+-- !sql_array_first_index7 --
+0
+2
+0
+0
+0
+
 -- !sql_array_last_index1 --
 0
 4
@@ -482,6 +594,13 @@ false
 0
 0
 
+-- !sql_array_last_index7 --
+0
+4
+0
+0
+0
+
 -- !sql_array_intersect1 --
 [4, 2]
 []
@@ -510,6 +629,13 @@ false
 \N
 \N
 
+-- !sql_array_intersect5 --
+[]
+[]
+[4, 2]
+[]
+\N
+
 -- !sql_array_map1 --
 [2, 3, 4, 5, 6]
 [2, null, 4, null, 6]
@@ -594,6 +720,20 @@ false
 []
 \N
 
+-- !sql_array_map13 --
+[-170141183460469231731687303715884105728, 
170141183460469231731687303715884105727, 
170141183460469231731687303715884105726]
+[2, null, 4, null, 6]
+[2, 2, 3, 3, 3, 4, 2, 5]
+[]
+\N
+
+-- !sql_array_map14 --
+[0, 0, 0]
+[0, 1, 0, 1, 0]
+[0, 0, 0, 0, 0, 0, 0, 0]
+[]
+\N
+
 -- !sql_array_position1 --
 2
 0
@@ -643,6 +783,20 @@ false
 0
 \N
 
+-- !sql_array_position8 --
+0
+3
+6
+0
+\N
+
+-- !sql_array_position9 --
+0
+2
+0
+0
+\N
+
 -- !sql_literal_array_apply --
 [3]
 
@@ -724,6 +878,13 @@ false
 \N
 \N
 
+-- !sql_array_avg --
+1.701411834604692e+38
+3
+2
+\N
+\N
+
 -- !sql_array_avg --
 \N
 \N
@@ -766,6 +927,13 @@ false
 \N
 \N
 
+-- !sql_array_max --
+170141183460469231731687303715884105727
+5
+4
+\N
+\N
+
 -- !sql_array_max --
 \N
 \N
@@ -808,6 +976,13 @@ false
 \N
 \N
 
+-- !sql_array_min --
+170141183460469231731687303715884105725
+1
+1
+\N
+\N
+
 -- !sql_array_min --
 \N
 \N
diff --git a/regression-test/suites/doc/sql-manual/ArrayNullsafe.groovy 
b/regression-test/suites/doc/sql-manual/ArrayNullsafe.groovy
index 4867c509399..dbb62174b98 100644
--- a/regression-test/suites/doc/sql-manual/ArrayNullsafe.groovy
+++ b/regression-test/suites/doc/sql-manual/ArrayNullsafe.groovy
@@ -29,7 +29,8 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
             `string_array` ARRAY<STRING>,
             `date_array` ARRAY<DATE>,
             `ipv4_array` ARRAY<IPV4>,
-            `ipv6_array` ARRAY<IPV6>
+            `ipv6_array` ARRAY<IPV6>,
+            `largeint_array` ARRAY<LARGEINT>
         ) engine=olap
         DISTRIBUTED BY HASH(`id`) BUCKETS 1
         properties("replication_num" = "1")
@@ -38,37 +39,43 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     // insert into fn_test_nullsafe_array with null element
     sql """
         INSERT INTO fn_test_nullsafe_array VALUES
-        (1, [1, 2, 3, 4, 5], [1.1, 2.2, 3.3, 4.4, 5.5], ['a', 'b', 'c', 'd', 
'e'], ['2023-01-01', '2023-01-02', '2023-01-03'], ['192.168.1.1', 
'192.168.1.2'], ['2001:db8::1', '2001:db8::2']),
-        (2, [1, null, 3, null, 5], [1.1, null, 3.3, null, 5.5], ['a', null, 
'c', null, 'e'], ['2023-01-01', null, '2023-01-03'], ['192.168.1.1', null, 
'192.168.1.3'], ['2001:db8::1', null, '2001:db8::3']),
-        (3, [1, 1, 2, 2, 2, 3, 1, 4], [1.1, 1.1, 2.2, 2.2, 2.2, 3.3, 1.1, 
4.4], ['a', 'a', 'b', 'b', 'c'], ['2023-01-01', '2023-01-01', '2023-01-02'], 
['192.168.1.1', '192.168.1.1', '192.168.1.2'], ['2001:db8::1', '2001:db8::1', 
'2001:db8::2']),
-        (4, [], [], [], [], [], []),
-        (5, NULL, NULL, NULL, NULL, NULL, NULL)
+        (1, [1, 2, 3, 4, 5], [1.1, 2.2, 3.3, 4.4, 5.5], ['a', 'b', 'c', 'd', 
'e'], ['2023-01-01', '2023-01-02', '2023-01-03'], ['192.168.1.1', 
'192.168.1.2'], ['2001:db8::1', '2001:db8::2'], 
[170141183460469231731687303715884105727, 
170141183460469231731687303715884105726, 
170141183460469231731687303715884105725]),
+        (2, [1, null, 3, null, 5], [1.1, null, 3.3, null, 5.5], ['a', null, 
'c', null, 'e'], ['2023-01-01', null, '2023-01-03'], ['192.168.1.1', null, 
'192.168.1.3'], ['2001:db8::1', null, '2001:db8::3'], [1, null, 3, null, 5]),
+        (3, [1, 1, 2, 2, 2, 3, 1, 4], [1.1, 1.1, 2.2, 2.2, 2.2, 3.3, 1.1, 
4.4], ['a', 'a', 'b', 'b', 'c'], ['2023-01-01', '2023-01-01', '2023-01-02'], 
['192.168.1.1', '192.168.1.1', '192.168.1.2'], ['2001:db8::1', '2001:db8::1', 
'2001:db8::2'], [1, 1, 2, 2, 2, 3, 1, 4]),
+        (4, [], [], [], [], [], [], []),
+        (5, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
     """
 
     // test function behavior with nullsafe array
     // array_apply nullsafe tests
     qt_sql_array_apply1 "SELECT array_apply(int_array, '>', 2) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_apply2 "SELECT array_apply(double_array, '<', 1.1) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_apply3 "SELECT array_apply(largeint_array, '>', 2) FROM 
fn_test_nullsafe_array order by id"
 
     // array_compact nullsafe tests
     qt_sql_array_compact4 "SELECT array_compact(date_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_compact5 "SELECT array_compact(ipv4_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_compact6 "SELECT array_compact(ipv6_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_compact7 "SELECT array_compact(largeint_array) FROM 
fn_test_nullsafe_array order by id"
 
     // array_concat nullsafe tests
     qt_sql_array_concat1 "SELECT array_concat(int_array, [6, 7, 8]) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_concat2 "SELECT array_concat(string_array, NULL) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_concat3 "SELECT array_concat(double_array, []) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_concat4 "SELECT array_concat(largeint_array, [6, 7, 8]) FROM 
fn_test_nullsafe_array order by id"
 
     // array-contains nullsafe tests
     qt_sql_array_contains2 "SELECT array_contains(int_array, 3) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_contains4 "SELECT array_contains(ipv4_array, null) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_contains5 "SELECT array_contains(ipv6_array, '2001:db8::1') 
FROM fn_test_nullsafe_array order by id"
+    qt_sql_array_contains6 "SELECT array_contains(largeint_array, 3) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_contains7 "SELECT array_contains(largeint_array, null) FROM 
fn_test_nullsafe_array order by id"
     
     // array-count nullsafe tests
     qt_sql_array_count1 "SELECT array_count(x -> x > 2, int_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_count2 "SELECT array_count(x -> x is null, string_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_count3 "SELECT array_count(x -> x > '192.168.1.1', 
ipv4_array) FROM fn_test_nullsafe_array order by id"
+    qt_sql_array_count4 "SELECT array_count(x -> x > 2, largeint_array) FROM 
fn_test_nullsafe_array order by id"
     
     // array-cum-sum nullsafe tests
     qt_sql_array_cum_sum1 "SELECT array_cum_sum(int_array) FROM 
fn_test_nullsafe_array order by id"
@@ -79,17 +86,20 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     // array-difference nullsafe tests
     qt_sql_array_difference1 "SELECT array_difference(double_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_difference3 "SELECT array_difference(string_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_difference4 "SELECT array_difference(largeint_array) FROM 
fn_test_nullsafe_array order by id"
     
     // array-distinct nullsafe tests
     qt_sql_array_distinct2 "SELECT array_distinct(string_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_distinct3 "SELECT array_distinct(ipv4_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_distinct4 "SELECT array_distinct(ipv6_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_distinct5 "SELECT array_distinct(largeint_array) FROM 
fn_test_nullsafe_array order by id"
     
     // array-except nullsafe tests
     qt_sql_array_except1 "SELECT array_except(int_array, [2, 4]) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_except2 "SELECT array_except(string_array, [null, 3]) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_except3 "SELECT array_except(ipv4_array, []) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_except4 "SELECT array_except(ipv6_array, NULL) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_except5 "SELECT array_except(largeint_array, [2, 4]) FROM 
fn_test_nullsafe_array order by id"
 
     // array-filter nullsafe tests
     qt_sql_array_filter1 "SELECT array_filter(x -> x > 2, int_array) FROM 
fn_test_nullsafe_array order by id"
@@ -97,18 +107,21 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     qt_sql_array_filter3 "SELECT array_filter(x -> x > 2.2, double_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_filter4 "SELECT array_filter(x -> x > '2023-01-02', 
date_array) FROM fn_test_nullsafe_array order by id"
     qt_sql_array_filter5 "SELECT array_filter(x -> x = '192.168.1.2', 
ipv4_array) FROM fn_test_nullsafe_array order by id"
+    qt_sql_array_filter6 "SELECT array_filter(x -> x > 2, largeint_array) FROM 
fn_test_nullsafe_array order by id"
 
     // array-enumerate-unique nullsafe tests
     qt_sql_array_enumerate_uniq1 "SELECT array_enumerate_uniq(int_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_enumerate_uniq2 "SELECT array_enumerate_uniq(string_array) 
FROM fn_test_nullsafe_array order by id"
     qt_sql_array_enumerate_uniq3 "SELECT array_enumerate_uniq(ipv4_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_enumerate_uniq4 "SELECT array_enumerate_uniq(ipv6_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_enumerate_uniq5 "SELECT array_enumerate_uniq(largeint_array) 
FROM fn_test_nullsafe_array order by id"
 
     // array-enumerate nullsafe tests
     qt_sql_array_enumerate1 "SELECT array_enumerate(int_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_enumerate2 "SELECT array_enumerate(string_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_enumerate3 "SELECT array_enumerate(ipv4_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_enumerate4 "SELECT array_enumerate(ipv6_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_enumerate5 "SELECT array_enumerate(largeint_array) FROM 
fn_test_nullsafe_array order by id"
 
     // array-exists nullsafe tests
     qt_sql_array_exists1 "SELECT array_exists(x -> x is null, int_array) FROM 
fn_test_nullsafe_array order by id"
@@ -117,6 +130,7 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     qt_sql_array_exists4 "SELECT array_exists(x -> x is null, date_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_exists5 "SELECT array_exists(x -> x is null, ipv4_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_exists6 "SELECT array_exists(x -> x is null, ipv6_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_exists7 "SELECT array_exists(x -> x is null, largeint_array) 
FROM fn_test_nullsafe_array order by id"
     
     // array-first nullsafe tests
     qt_sql_array_first1 "SELECT array_first(x -> x is null, int_array) FROM 
fn_test_nullsafe_array order by id"
@@ -125,6 +139,7 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     qt_sql_array_first4 "SELECT array_first(x -> x is null, date_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_first5 "SELECT array_first(x -> x is null, ipv4_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_first6 "SELECT array_first(x -> x is null, ipv6_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_first7 "SELECT array_first(x -> x is null, largeint_array) 
FROM fn_test_nullsafe_array order by id"
 
     // array-last nullsafe tests
     qt_sql_array_last1 "SELECT array_last(x -> x is null, int_array) FROM 
fn_test_nullsafe_array order by id"
@@ -133,6 +148,7 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     qt_sql_array_last4 "SELECT array_last(x -> x is null, date_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_last5 "SELECT array_last(x -> x is null, ipv4_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_last6 "SELECT array_last(x -> x is null, ipv6_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_last7 "SELECT array_last(x -> x is null, largeint_array) FROM 
fn_test_nullsafe_array order by id"
 
     // array-first-index nullsafe tests
     qt_sql_array_first_index1 "SELECT array_first_index(x -> x is null, 
int_array) FROM fn_test_nullsafe_array order by id"
@@ -141,6 +157,7 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     qt_sql_array_first_index4 "SELECT array_first_index(x -> x is null, 
date_array) FROM fn_test_nullsafe_array order by id"
     qt_sql_array_first_index5 "SELECT array_first_index(x -> x is null, 
ipv4_array) FROM fn_test_nullsafe_array order by id"
     qt_sql_array_first_index6 "SELECT array_first_index(x -> x is null, 
ipv6_array) FROM fn_test_nullsafe_array order by id"
+    qt_sql_array_first_index7 "SELECT array_first_index(x -> x is null, 
largeint_array) FROM fn_test_nullsafe_array order by id"
 
     // array-last-index nullsafe tests
     qt_sql_array_last_index1 "SELECT array_last_index(x -> x is null, 
int_array) FROM fn_test_nullsafe_array order by id"
@@ -149,12 +166,14 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     qt_sql_array_last_index4 "SELECT array_last_index(x -> x is null, 
date_array) FROM fn_test_nullsafe_array order by id"
     qt_sql_array_last_index5 "SELECT array_last_index(x -> x is null, 
ipv4_array) FROM fn_test_nullsafe_array order by id"
     qt_sql_array_last_index6 "SELECT array_last_index(x -> x is null, 
ipv6_array) FROM fn_test_nullsafe_array order by id"
+    qt_sql_array_last_index7 "SELECT array_last_index(x -> x is null, 
largeint_array) FROM fn_test_nullsafe_array order by id"
 
     // array-intersect nullsafe tests
     qt_sql_array_intersect1 "SELECT array_intersect(int_array, [2, 4]) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_intersect2 "SELECT array_intersect(string_array, [null, '3']) 
FROM fn_test_nullsafe_array order by id"
     qt_sql_array_intersect3 "SELECT array_intersect(ipv4_array, []) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_intersect4 "SELECT array_intersect(ipv6_array, NULL) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_intersect5 "SELECT array_intersect(largeint_array, [2, 4]) 
FROM fn_test_nullsafe_array order by id"
 
     // array-map nullsafe tests
     qt_sql_array_map1 "SELECT array_map(x -> x + 1, int_array) FROM 
fn_test_nullsafe_array order by id"
@@ -170,6 +189,8 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     qt_sql_array_map10 "SELECT array_map(x -> x is null, date_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_map11 "SELECT array_map(x -> x is null, ipv4_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_map12 "SELECT array_map(x -> x is null, ipv6_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_map13 "SELECT array_map(x -> x + 1, largeint_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_map14 "SELECT array_map(x -> x is null, largeint_array) FROM 
fn_test_nullsafe_array order by id"
 
 
     // array-position nullsafe tests
@@ -180,6 +201,8 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     qt_sql_array_position5 "SELECT array_position(ipv4_array, '192.168.1.2') 
FROM fn_test_nullsafe_array order by id"
     qt_sql_array_position6 "SELECT array_position(ipv6_array, '2001:db8::1') 
FROM fn_test_nullsafe_array order by id"
     qt_sql_array_position7 "SELECT array_position(string_array, null) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_position8 "SELECT array_position(largeint_array, 3) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_position9 "SELECT array_position(largeint_array, null) FROM 
fn_test_nullsafe_array order by id"
 
     // literal nullsafe tests for functions 
     qt_sql_literal_array_apply "SELECT array_apply([1, null, 3], '>', 2)"
@@ -231,6 +254,7 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     // array_avg
     qt_sql_array_avg "SELECT array_avg(int_array) FROM fn_test_nullsafe_array 
order by id"
     qt_sql_array_avg "SELECT array_avg(double_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_avg "SELECT array_avg(largeint_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_avg "SELECT array_avg(null) FROM fn_test_nullsafe_array order 
by id"
     qt_sql_array_avg "SELECT array_avg([]) FROM fn_test_nullsafe_array order 
by id"
     qt_sql_array_avg "SELECT array_avg([null]) FROM fn_test_nullsafe_array 
order by id"
@@ -239,6 +263,7 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     // array_max
     qt_sql_array_max "SELECT array_max(int_array) FROM fn_test_nullsafe_array 
order by id"
     qt_sql_array_max "SELECT array_max(double_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_max "SELECT array_max(largeint_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_max "SELECT array_max(null) FROM fn_test_nullsafe_array order 
by id"
     qt_sql_array_max "SELECT array_max([]) FROM fn_test_nullsafe_array order 
by id"
     qt_sql_array_max "SELECT array_max([null]) FROM fn_test_nullsafe_array 
order by id"
@@ -247,6 +272,7 @@ suite("nereids_scalar_fn_ArrayNullsafe", "p0") {
     // array_min
     qt_sql_array_min "SELECT array_min(int_array) FROM fn_test_nullsafe_array 
order by id"
     qt_sql_array_min "SELECT array_min(double_array) FROM 
fn_test_nullsafe_array order by id"
+    qt_sql_array_min "SELECT array_min(largeint_array) FROM 
fn_test_nullsafe_array order by id"
     qt_sql_array_min "SELECT array_min(null) FROM fn_test_nullsafe_array order 
by id"
     qt_sql_array_min "SELECT array_min([]) FROM fn_test_nullsafe_array order 
by id"
     qt_sql_array_min "SELECT array_min([null]) FROM fn_test_nullsafe_array 
order by id"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to