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

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new c246d730a42 branch-4.1: [Fix](fold_const) MAKE_SET constant folding 
should clear #64907 (#64919)
c246d730a42 is described below

commit c246d730a42e8551e2e44d3a9f6bc791e5ca24b0
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jun 30 12:24:48 2026 +0800

    branch-4.1: [Fix](fold_const) MAKE_SET constant folding should clear #64907 
(#64919)
    
    Cherry-picked from #64907
    
    Co-authored-by: linrrarity <[email protected]>
---
 .../trees/expressions/functions/executable/StringArithmetic.java     | 2 +-
 .../sql_functions/string_functions/test_string_function.groovy       | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/StringArithmetic.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/StringArithmetic.java
index ae0f29806cc..0995c68c559 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/StringArithmetic.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/StringArithmetic.java
@@ -1134,7 +1134,7 @@ public class StringArithmetic {
         while (pos != 64 && pos < args.length && bit != 0) {
             sb.append(args[pos].getValue());
             sb.append(',');
-            bit &= ~(1 << pos);
+            bit &= ~(1L << pos);
             pos = Long.numberOfTrailingZeros(bit);
         }
         if (sb.length() != 0) {
diff --git 
a/regression-test/suites/query_p0/sql_functions/string_functions/test_string_function.groovy
 
b/regression-test/suites/query_p0/sql_functions/string_functions/test_string_function.groovy
index 34084fbdd20..0c4a4441305 100644
--- 
a/regression-test/suites/query_p0/sql_functions/string_functions/test_string_function.groovy
+++ 
b/regression-test/suites/query_p0/sql_functions/string_functions/test_string_function.groovy
@@ -515,6 +515,11 @@ suite("test_string_function", "arrow_flight_sql") {
     testFoldConst("SELECT MAKE_SET(4611686018427387903, 'a', 'b', 'c');")
     testFoldConst("SELECT MAKE_SET(BIT_SHIFT_LEFT(1, 50) - 3, 'first', 
'second', 'third');")
     testFoldConst("SELECT MAKE_SET(3, '', 'a');")
+    testFoldConst("SELECT MAKE_SET(4294967296, 'a00', 'a01', 'a02', 'a03', 
'a04', 'a05', 'a06', 'a07', " +
+            "'a08', 'a09', 'a10', 'a11', 'a12', 'a13', 'a14', 'a15', " +
+            "'a16', 'a17', 'a18', 'a19', 'a20', 'a21', 'a22', 'a23', " +
+            "'a24', 'a25', 'a26', 'a27', 'a28', 'a29', 'a30', 'a31', " +
+            "'a32', 'a33');")
 
     test {
         sql"""SELECT MAKE_SET(184467440737095516156, 'a', 'b', 'c');"""


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

Reply via email to