Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@
-- !select --
[]

-- !select --
true 1

-- !select --
true

-- !select --
true 1

-- !select --
true
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@ suite("test_if") {
qt_select "select if(job_d is null, array(), job_d) as test from (select array('1970-01-01', '1970-01-01') as job_d) t"
qt_select "select if(job_d is null, array('1970-01-01'), job_d) as test from (select array('1970-01-01', '1970-01-01') as job_d) t"
qt_select "select if(job_d is null, job_d, array()) as test from (select array('1970-01-01', '1970-01-01') as job_d) t"

// user case https://github.com/apache/doris/issues/25644
qt_select "SELECT /*+SET_VAR(enable_nereids_planner=true)*/ NOT ISNULL(CASE WHEN IFNULL ((t1.region IN ('US')),0) THEN t1.region ELSE 'other' END) AS account_id, count(*) FROM (select 'US' AS region) as t1 group by 1"
qt_select "SELECT /*+SET_VAR(enable_nereids_planner=true)*/ NOT ISNULL(CASE WHEN IFNULL (('US' IN ('US')),0) THEN 'US' ELSE 'other' END);"

qt_select "SELECT /*+SET_VAR(enable_nereids_planner=false)*/ NOT ISNULL(CASE WHEN IFNULL ((t1.region IN ('US')),0) THEN t1.region ELSE 'other' END) AS account_id, count(*) FROM (select 'US' AS region) as t1 group by 1"
qt_select "SELECT /*+SET_VAR(enable_nereids_planner=false)*/ NOT ISNULL(CASE WHEN IFNULL (('US' IN ('US')),0) THEN 'US' ELSE 'other' END);"
}