This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 2ae03d7e021 branch-2.1: [Bug](function) fix wrong result when case when have more than 256 conditions and the… #47179 (#47392) 2ae03d7e021 is described below commit 2ae03d7e0218ae9c832ffab1a5db1b98cc6327c3 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Sat Jan 25 10:04:50 2025 +0800 branch-2.1: [Bug](function) fix wrong result when case when have more than 256 conditions and the… #47179 (#47392) Cherry-picked from #47179 Co-authored-by: Pxl <x...@selectdb.com> --- be/src/vec/functions/function_case.h | 13 +- .../case_function/test_case_function.out | Bin 361 -> 462 bytes .../case_function/test_case_function.groovy | 548 +++++++++++++++++++++ 3 files changed, 551 insertions(+), 10 deletions(-) diff --git a/be/src/vec/functions/function_case.h b/be/src/vec/functions/function_case.h index 26e12e7bd13..64517ad4ff7 100644 --- a/be/src/vec/functions/function_case.h +++ b/be/src/vec/functions/function_case.h @@ -173,16 +173,9 @@ public: break; } } else { - if constexpr (when_null) { - if (!then_idx_ptr[row_idx] && when_column_ptr->get_bool(row_idx)) { - then_idx_ptr[row_idx] = i; - break; - } - } else { - if (!then_idx_ptr[row_idx]) { - then_idx_ptr[row_idx] = i; - break; - } + if (!then_idx_ptr[row_idx] && when_column_ptr->get_bool(row_idx)) { + then_idx_ptr[row_idx] = i; + break; } } } diff --git a/regression-test/data/query_p0/sql_functions/case_function/test_case_function.out b/regression-test/data/query_p0/sql_functions/case_function/test_case_function.out index f670d4336d6..db01dac929a 100644 Binary files a/regression-test/data/query_p0/sql_functions/case_function/test_case_function.out and b/regression-test/data/query_p0/sql_functions/case_function/test_case_function.out differ diff --git a/regression-test/suites/query_p0/sql_functions/case_function/test_case_function.groovy b/regression-test/suites/query_p0/sql_functions/case_function/test_case_function.groovy index 9fe635c4590..ad61348266e 100644 --- a/regression-test/suites/query_p0/sql_functions/case_function/test_case_function.groovy +++ b/regression-test/suites/query_p0/sql_functions/case_function/test_case_function.groovy @@ -1277,4 +1277,552 @@ suite("test_case_function", "query,p0") { when k1>10 then '+' when k1>10 then '+' when k1<10 then '-' end order by 1, 2""" + + sql "drop table if exists d_table;" + sql """ + create table d_table (k1 varchar(100) not null) + duplicate key (k1) + PROPERTIES ( + "replication_allocation" = "tag.location.default: 1" + ); + """ + sql "insert into d_table values ('A259'),('A300'),('A5');" + qt_test_not_null_then """ + +SELECT k1, + CASE k1 + WHEN 'A1' THEN 'A1' + WHEN 'A2' THEN 'A2' + WHEN 'A3' THEN 'A3' + WHEN 'A4' THEN 'A4' + WHEN 'A5' THEN 'A5' + WHEN 'A6' THEN 'A6' + WHEN 'A7' THEN 'A7' + WHEN 'A8' THEN 'A8' + WHEN 'A9' THEN 'A9' + WHEN 'A10' THEN 'A10' + WHEN 'A11' THEN 'A11' + WHEN 'A12' THEN 'A12' + WHEN 'A13' THEN 'A13' + WHEN 'A14' THEN 'A14' + WHEN 'A15' THEN 'A15' + WHEN 'A16' THEN 'A16' + WHEN 'A17' THEN 'A17' + WHEN 'A18' THEN 'A18' + WHEN 'A19' THEN 'A19' + WHEN 'A20' THEN 'A20' + WHEN 'A21' THEN 'A21' + WHEN 'A22' THEN 'A22' + WHEN 'A23' THEN 'A23' + WHEN 'A24' THEN 'A24' + WHEN 'A25' THEN 'A25' + WHEN 'A26' THEN 'A26' + WHEN 'A27' THEN 'A27' + WHEN 'A28' THEN 'A28' + WHEN 'A29' THEN 'A29' + WHEN 'A30' THEN 'A30' + WHEN 'A31' THEN 'A31' + WHEN 'A32' THEN 'A32' + WHEN 'A33' THEN 'A33' + WHEN 'A34' THEN 'A34' + WHEN 'A35' THEN 'A35' + WHEN 'A36' THEN 'A36' + WHEN 'A37' THEN 'A37' + WHEN 'A38' THEN 'A38' + WHEN 'A39' THEN 'A39' + WHEN 'A40' THEN 'A40' + WHEN 'A41' THEN 'A41' + WHEN 'A42' THEN 'A42' + WHEN 'A43' THEN 'A43' + WHEN 'A44' THEN 'A44' + WHEN 'A45' THEN 'A45' + WHEN 'A46' THEN 'A46' + WHEN 'A47' THEN 'A47' + WHEN 'A48' THEN 'A48' + WHEN 'A49' THEN 'A49' + WHEN 'A50' THEN 'A50' + WHEN 'A51' THEN 'A51' + WHEN 'A52' THEN 'A52' + WHEN 'A53' THEN 'A53' + WHEN 'A54' THEN 'A54' + WHEN 'A55' THEN 'A55' + WHEN 'A56' THEN 'A56' + WHEN 'A57' THEN 'A57' + WHEN 'A58' THEN 'A58' + WHEN 'A59' THEN 'A59' + WHEN 'A60' THEN 'A60' + WHEN 'A61' THEN 'A61' + WHEN 'A62' THEN 'A62' + WHEN 'A63' THEN 'A63' + WHEN 'A64' THEN 'A64' + WHEN 'A65' THEN 'A65' + WHEN 'A66' THEN 'A66' + WHEN 'A67' THEN 'A67' + WHEN 'A68' THEN 'A68' + WHEN 'A69' THEN 'A69' + WHEN 'A70' THEN 'A70' + WHEN 'A71' THEN 'A71' + WHEN 'A72' THEN 'A72' + WHEN 'A73' THEN 'A73' + WHEN 'A74' THEN 'A74' + WHEN 'A75' THEN 'A75' + WHEN 'A76' THEN 'A76' + WHEN 'A77' THEN 'A77' + WHEN 'A78' THEN 'A78' + WHEN 'A79' THEN 'A79' + WHEN 'A80' THEN 'A80' + WHEN 'A81' THEN 'A81' + WHEN 'A82' THEN 'A82' + WHEN 'A83' THEN 'A83' + WHEN 'A84' THEN 'A84' + WHEN 'A85' THEN 'A85' + WHEN 'A86' THEN 'A86' + WHEN 'A87' THEN 'A87' + WHEN 'A88' THEN 'A88' + WHEN 'A89' THEN 'A89' + WHEN 'A90' THEN 'A90' + WHEN 'A91' THEN 'A91' + WHEN 'A92' THEN 'A92' + WHEN 'A93' THEN 'A93' + WHEN 'A94' THEN 'A94' + WHEN 'A95' THEN 'A95' + WHEN 'A96' THEN 'A96' + WHEN 'A97' THEN 'A97' + WHEN 'A98' THEN 'A98' + WHEN 'A99' THEN 'A99' + WHEN 'A100' THEN 'A100' + WHEN 'A101' THEN 'A101' + WHEN 'A102' THEN 'A102' + WHEN 'A103' THEN 'A103' + WHEN 'A104' THEN 'A104' + WHEN 'A105' THEN 'A105' + WHEN 'A106' THEN 'A106' + WHEN 'A107' THEN 'A107' + WHEN 'A108' THEN 'A108' + WHEN 'A109' THEN 'A109' + WHEN 'A110' THEN 'A110' + WHEN 'A111' THEN 'A111' + WHEN 'A112' THEN 'A112' + WHEN 'A113' THEN 'A113' + WHEN 'A114' THEN 'A114' + WHEN 'A115' THEN 'A115' + WHEN 'A116' THEN 'A116' + WHEN 'A117' THEN 'A117' + WHEN 'A118' THEN 'A118' + WHEN 'A119' THEN 'A119' + WHEN 'A120' THEN 'A120' + WHEN 'A121' THEN 'A121' + WHEN 'A122' THEN 'A122' + WHEN 'A123' THEN 'A123' + WHEN 'A124' THEN 'A124' + WHEN 'A125' THEN 'A125' + WHEN 'A126' THEN 'A126' + WHEN 'A127' THEN 'A127' + WHEN 'A128' THEN 'A128' + WHEN 'A129' THEN 'A129' + WHEN 'A130' THEN 'A130' + WHEN 'A131' THEN 'A131' + WHEN 'A132' THEN 'A132' + WHEN 'A133' THEN 'A133' + WHEN 'A134' THEN 'A134' + WHEN 'A135' THEN 'A135' + WHEN 'A136' THEN 'A136' + WHEN 'A137' THEN 'A137' + WHEN 'A138' THEN 'A138' + WHEN 'A139' THEN 'A139' + WHEN 'A140' THEN 'A140' + WHEN 'A141' THEN 'A141' + WHEN 'A142' THEN 'A142' + WHEN 'A143' THEN 'A143' + WHEN 'A144' THEN 'A144' + WHEN 'A145' THEN 'A145' + WHEN 'A146' THEN 'A146' + WHEN 'A147' THEN 'A147' + WHEN 'A148' THEN 'A148' + WHEN 'A149' THEN 'A149' + WHEN 'A150' THEN 'A150' + WHEN 'A151' THEN 'A151' + WHEN 'A152' THEN 'A152' + WHEN 'A153' THEN 'A153' + WHEN 'A154' THEN 'A154' + WHEN 'A155' THEN 'A155' + WHEN 'A156' THEN 'A156' + WHEN 'A157' THEN 'A157' + WHEN 'A158' THEN 'A158' + WHEN 'A159' THEN 'A159' + WHEN 'A160' THEN 'A160' + WHEN 'A161' THEN 'A161' + WHEN 'A162' THEN 'A162' + WHEN 'A163' THEN 'A163' + WHEN 'A164' THEN 'A164' + WHEN 'A165' THEN 'A165' + WHEN 'A166' THEN 'A166' + WHEN 'A167' THEN 'A167' + WHEN 'A168' THEN 'A168' + WHEN 'A169' THEN 'A169' + WHEN 'A170' THEN 'A170' + WHEN 'A171' THEN 'A171' + WHEN 'A172' THEN 'A172' + WHEN 'A173' THEN 'A173' + WHEN 'A174' THEN 'A174' + WHEN 'A175' THEN 'A175' + WHEN 'A176' THEN 'A176' + WHEN 'A177' THEN 'A177' + WHEN 'A178' THEN 'A178' + WHEN 'A179' THEN 'A179' + WHEN 'A180' THEN 'A180' + WHEN 'A181' THEN 'A181' + WHEN 'A182' THEN 'A182' + WHEN 'A183' THEN 'A183' + WHEN 'A184' THEN 'A184' + WHEN 'A185' THEN 'A185' + WHEN 'A186' THEN 'A186' + WHEN 'A187' THEN 'A187' + WHEN 'A188' THEN 'A188' + WHEN 'A189' THEN 'A189' + WHEN 'A190' THEN 'A190' + WHEN 'A191' THEN 'A191' + WHEN 'A192' THEN 'A192' + WHEN 'A193' THEN 'A193' + WHEN 'A194' THEN 'A194' + WHEN 'A195' THEN 'A195' + WHEN 'A196' THEN 'A196' + WHEN 'A197' THEN 'A197' + WHEN 'A198' THEN 'A198' + WHEN 'A199' THEN 'A199' + WHEN 'A200' THEN 'A200' + WHEN 'A201' THEN 'A201' + WHEN 'A202' THEN 'A202' + WHEN 'A203' THEN 'A203' + WHEN 'A204' THEN 'A204' + WHEN 'A205' THEN 'A205' + WHEN 'A206' THEN 'A206' + WHEN 'A207' THEN 'A207' + WHEN 'A208' THEN 'A208' + WHEN 'A209' THEN 'A209' + WHEN 'A210' THEN 'A210' + WHEN 'A211' THEN 'A211' + WHEN 'A212' THEN 'A212' + WHEN 'A213' THEN 'A213' + WHEN 'A214' THEN 'A214' + WHEN 'A215' THEN 'A215' + WHEN 'A216' THEN 'A216' + WHEN 'A217' THEN 'A217' + WHEN 'A218' THEN 'A218' + WHEN 'A219' THEN 'A219' + WHEN 'A220' THEN 'A220' + WHEN 'A221' THEN 'A221' + WHEN 'A222' THEN 'A222' + WHEN 'A223' THEN 'A223' + WHEN 'A224' THEN 'A224' + WHEN 'A225' THEN 'A225' + WHEN 'A226' THEN 'A226' + WHEN 'A227' THEN 'A227' + WHEN 'A228' THEN 'A228' + WHEN 'A229' THEN 'A229' + WHEN 'A230' THEN 'A230' + WHEN 'A231' THEN 'A231' + WHEN 'A232' THEN 'A232' + WHEN 'A233' THEN 'A233' + WHEN 'A234' THEN 'A234' + WHEN 'A235' THEN 'A235' + WHEN 'A236' THEN 'A236' + WHEN 'A237' THEN 'A237' + WHEN 'A238' THEN 'A238' + WHEN 'A239' THEN 'A239' + WHEN 'A240' THEN 'A240' + WHEN 'A241' THEN 'A241' + WHEN 'A242' THEN 'A242' + WHEN 'A243' THEN 'A243' + WHEN 'A244' THEN 'A244' + WHEN 'A245' THEN 'A245' + WHEN 'A246' THEN 'A246' + WHEN 'A247' THEN 'A247' + WHEN 'A248' THEN 'A248' + WHEN 'A249' THEN 'A249' + WHEN 'A250' THEN 'A250' + WHEN 'A251' THEN 'A251' + WHEN 'A252' THEN 'A252' + WHEN 'A253' THEN 'A253' + WHEN 'A254' THEN 'A254' + WHEN 'A255' THEN 'A255' + WHEN 'A256' THEN 'A256' + WHEN 'A257' THEN 'A257' + WHEN 'A258' THEN 'A258' + WHEN 'A259' THEN 'A259' + WHEN 'A260' THEN 'A260' + ELSE 'OTHER' + END AS k2 +FROM `d_table` order by k1; + """ + + qt_test_null_then """ + +SELECT k1, + CASE k1 + WHEN 'A1' THEN 'A1' + WHEN 'A2' THEN 'A2' + WHEN 'A3' THEN 'A3' + WHEN 'A4' THEN 'A4' + WHEN 'A5' THEN 'A5' + WHEN 'A6' THEN 'A6' + WHEN 'A7' THEN 'A7' + WHEN 'A8' THEN 'A8' + WHEN 'A9' THEN 'A9' + WHEN 'A10' THEN 'A10' + WHEN 'A11' THEN 'A11' + WHEN 'A12' THEN 'A12' + WHEN 'A13' THEN 'A13' + WHEN 'A14' THEN 'A14' + WHEN 'A15' THEN 'A15' + WHEN 'A16' THEN 'A16' + WHEN 'A17' THEN 'A17' + WHEN 'A18' THEN 'A18' + WHEN 'A19' THEN 'A19' + WHEN 'A20' THEN 'A20' + WHEN 'A21' THEN 'A21' + WHEN 'A22' THEN 'A22' + WHEN 'A23' THEN 'A23' + WHEN 'A24' THEN 'A24' + WHEN 'A25' THEN 'A25' + WHEN 'A26' THEN 'A26' + WHEN 'A27' THEN 'A27' + WHEN 'A28' THEN 'A28' + WHEN 'A29' THEN 'A29' + WHEN 'A30' THEN 'A30' + WHEN 'A31' THEN 'A31' + WHEN 'A32' THEN 'A32' + WHEN 'A33' THEN 'A33' + WHEN 'A34' THEN 'A34' + WHEN 'A35' THEN 'A35' + WHEN 'A36' THEN 'A36' + WHEN 'A37' THEN 'A37' + WHEN 'A38' THEN 'A38' + WHEN 'A39' THEN 'A39' + WHEN 'A40' THEN 'A40' + WHEN 'A41' THEN 'A41' + WHEN 'A42' THEN 'A42' + WHEN 'A43' THEN 'A43' + WHEN 'A44' THEN 'A44' + WHEN 'A45' THEN 'A45' + WHEN 'A46' THEN 'A46' + WHEN 'A47' THEN 'A47' + WHEN 'A48' THEN 'A48' + WHEN 'A49' THEN 'A49' + WHEN 'A50' THEN 'A50' + WHEN 'A51' THEN 'A51' + WHEN 'A52' THEN 'A52' + WHEN 'A53' THEN 'A53' + WHEN 'A54' THEN 'A54' + WHEN 'A55' THEN 'A55' + WHEN 'A56' THEN 'A56' + WHEN 'A57' THEN 'A57' + WHEN 'A58' THEN 'A58' + WHEN 'A59' THEN 'A59' + WHEN 'A60' THEN 'A60' + WHEN 'A61' THEN 'A61' + WHEN 'A62' THEN 'A62' + WHEN 'A63' THEN 'A63' + WHEN 'A64' THEN 'A64' + WHEN 'A65' THEN 'A65' + WHEN 'A66' THEN 'A66' + WHEN 'A67' THEN 'A67' + WHEN 'A68' THEN 'A68' + WHEN 'A69' THEN 'A69' + WHEN 'A70' THEN 'A70' + WHEN 'A71' THEN 'A71' + WHEN 'A72' THEN 'A72' + WHEN 'A73' THEN 'A73' + WHEN 'A74' THEN 'A74' + WHEN 'A75' THEN 'A75' + WHEN 'A76' THEN 'A76' + WHEN 'A77' THEN 'A77' + WHEN 'A78' THEN 'A78' + WHEN 'A79' THEN 'A79' + WHEN 'A80' THEN 'A80' + WHEN 'A81' THEN 'A81' + WHEN 'A82' THEN 'A82' + WHEN 'A83' THEN 'A83' + WHEN 'A84' THEN 'A84' + WHEN 'A85' THEN 'A85' + WHEN 'A86' THEN 'A86' + WHEN 'A87' THEN 'A87' + WHEN 'A88' THEN 'A88' + WHEN 'A89' THEN 'A89' + WHEN 'A90' THEN 'A90' + WHEN 'A91' THEN 'A91' + WHEN 'A92' THEN 'A92' + WHEN 'A93' THEN 'A93' + WHEN 'A94' THEN 'A94' + WHEN 'A95' THEN 'A95' + WHEN 'A96' THEN 'A96' + WHEN 'A97' THEN 'A97' + WHEN 'A98' THEN 'A98' + WHEN 'A99' THEN 'A99' + WHEN 'A100' THEN 'A100' + WHEN 'A101' THEN 'A101' + WHEN 'A102' THEN 'A102' + WHEN 'A103' THEN 'A103' + WHEN 'A104' THEN 'A104' + WHEN 'A105' THEN 'A105' + WHEN 'A106' THEN 'A106' + WHEN 'A107' THEN 'A107' + WHEN 'A108' THEN 'A108' + WHEN 'A109' THEN 'A109' + WHEN 'A110' THEN 'A110' + WHEN 'A111' THEN 'A111' + WHEN 'A112' THEN 'A112' + WHEN 'A113' THEN 'A113' + WHEN 'A114' THEN 'A114' + WHEN 'A115' THEN 'A115' + WHEN 'A116' THEN 'A116' + WHEN 'A117' THEN 'A117' + WHEN 'A118' THEN 'A118' + WHEN 'A119' THEN 'A119' + WHEN 'A120' THEN 'A120' + WHEN 'A121' THEN 'A121' + WHEN 'A122' THEN 'A122' + WHEN 'A123' THEN 'A123' + WHEN 'A124' THEN 'A124' + WHEN 'A125' THEN 'A125' + WHEN 'A126' THEN 'A126' + WHEN 'A127' THEN 'A127' + WHEN 'A128' THEN 'A128' + WHEN 'A129' THEN 'A129' + WHEN 'A130' THEN 'A130' + WHEN 'A131' THEN 'A131' + WHEN 'A132' THEN 'A132' + WHEN 'A133' THEN 'A133' + WHEN 'A134' THEN 'A134' + WHEN 'A135' THEN 'A135' + WHEN 'A136' THEN 'A136' + WHEN 'A137' THEN 'A137' + WHEN 'A138' THEN 'A138' + WHEN 'A139' THEN 'A139' + WHEN 'A140' THEN 'A140' + WHEN 'A141' THEN 'A141' + WHEN 'A142' THEN 'A142' + WHEN 'A143' THEN 'A143' + WHEN 'A144' THEN 'A144' + WHEN 'A145' THEN 'A145' + WHEN 'A146' THEN 'A146' + WHEN 'A147' THEN 'A147' + WHEN 'A148' THEN 'A148' + WHEN 'A149' THEN 'A149' + WHEN 'A150' THEN 'A150' + WHEN 'A151' THEN 'A151' + WHEN 'A152' THEN 'A152' + WHEN 'A153' THEN 'A153' + WHEN 'A154' THEN 'A154' + WHEN 'A155' THEN 'A155' + WHEN 'A156' THEN 'A156' + WHEN 'A157' THEN 'A157' + WHEN 'A158' THEN 'A158' + WHEN 'A159' THEN 'A159' + WHEN 'A160' THEN 'A160' + WHEN 'A161' THEN 'A161' + WHEN 'A162' THEN 'A162' + WHEN 'A163' THEN 'A163' + WHEN 'A164' THEN 'A164' + WHEN 'A165' THEN 'A165' + WHEN 'A166' THEN 'A166' + WHEN 'A167' THEN 'A167' + WHEN 'A168' THEN 'A168' + WHEN 'A169' THEN 'A169' + WHEN 'A170' THEN 'A170' + WHEN 'A171' THEN 'A171' + WHEN 'A172' THEN 'A172' + WHEN 'A173' THEN 'A173' + WHEN 'A174' THEN 'A174' + WHEN 'A175' THEN 'A175' + WHEN 'A176' THEN 'A176' + WHEN 'A177' THEN 'A177' + WHEN 'A178' THEN 'A178' + WHEN 'A179' THEN 'A179' + WHEN 'A180' THEN 'A180' + WHEN 'A181' THEN 'A181' + WHEN 'A182' THEN 'A182' + WHEN 'A183' THEN 'A183' + WHEN 'A184' THEN 'A184' + WHEN 'A185' THEN 'A185' + WHEN 'A186' THEN 'A186' + WHEN 'A187' THEN 'A187' + WHEN 'A188' THEN 'A188' + WHEN 'A189' THEN 'A189' + WHEN 'A190' THEN 'A190' + WHEN 'A191' THEN 'A191' + WHEN 'A192' THEN 'A192' + WHEN 'A193' THEN 'A193' + WHEN 'A194' THEN 'A194' + WHEN 'A195' THEN 'A195' + WHEN 'A196' THEN 'A196' + WHEN 'A197' THEN 'A197' + WHEN 'A198' THEN 'A198' + WHEN 'A199' THEN 'A199' + WHEN 'A200' THEN 'A200' + WHEN 'A201' THEN 'A201' + WHEN 'A202' THEN 'A202' + WHEN 'A203' THEN 'A203' + WHEN 'A204' THEN 'A204' + WHEN 'A205' THEN 'A205' + WHEN 'A206' THEN 'A206' + WHEN 'A207' THEN 'A207' + WHEN 'A208' THEN 'A208' + WHEN 'A209' THEN 'A209' + WHEN 'A210' THEN 'A210' + WHEN 'A211' THEN 'A211' + WHEN 'A212' THEN 'A212' + WHEN 'A213' THEN 'A213' + WHEN 'A214' THEN 'A214' + WHEN 'A215' THEN 'A215' + WHEN 'A216' THEN 'A216' + WHEN 'A217' THEN 'A217' + WHEN 'A218' THEN 'A218' + WHEN 'A219' THEN 'A219' + WHEN 'A220' THEN 'A220' + WHEN 'A221' THEN 'A221' + WHEN 'A222' THEN 'A222' + WHEN 'A223' THEN 'A223' + WHEN 'A224' THEN 'A224' + WHEN 'A225' THEN 'A225' + WHEN 'A226' THEN 'A226' + WHEN 'A227' THEN 'A227' + WHEN 'A228' THEN 'A228' + WHEN 'A229' THEN 'A229' + WHEN 'A230' THEN 'A230' + WHEN 'A231' THEN 'A231' + WHEN 'A232' THEN 'A232' + WHEN 'A233' THEN 'A233' + WHEN 'A234' THEN 'A234' + WHEN 'A235' THEN 'A235' + WHEN 'A236' THEN 'A236' + WHEN 'A237' THEN 'A237' + WHEN 'A238' THEN 'A238' + WHEN 'A239' THEN 'A239' + WHEN 'A240' THEN 'A240' + WHEN 'A241' THEN 'A241' + WHEN 'A242' THEN 'A242' + WHEN 'A243' THEN 'A243' + WHEN 'A244' THEN 'A244' + WHEN 'A245' THEN 'A245' + WHEN 'A246' THEN 'A246' + WHEN 'A247' THEN 'A247' + WHEN 'A248' THEN 'A248' + WHEN 'A249' THEN 'A249' + WHEN 'A250' THEN 'A250' + WHEN 'A251' THEN 'A251' + WHEN 'A252' THEN 'A252' + WHEN 'A253' THEN 'A253' + WHEN 'A254' THEN 'A254' + WHEN 'A255' THEN 'A255' + WHEN 'A256' THEN 'A256' + WHEN 'A257' THEN 'A257' + WHEN 'A258' THEN 'A258' + WHEN 'A259' THEN 'A259' + WHEN 'A260' THEN 'A260' + ELSE null + END AS k2 +FROM `d_table` order by k1; + + """ } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org