You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-10-31 18:30:33 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			890 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			890 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # -------------------------------------------------------------- #
 | |
| # Test case migrated from regression test suite: bug5044.sql
 | |
| #
 | |
| # Author: Daniel Lee, daniel.lee@mariadb.com
 | |
| # -------------------------------------------------------------- #
 | |
| #
 | |
| --source ../include/have_columnstore.inc
 | |
| #
 | |
| USE tpch1;
 | |
| #
 | |
| --disable_warnings
 | |
| create table if not exists casetest (id int, c1 int, c2 int, c3 int) engine=columnstore;
 | |
| --enable_warnings
 | |
| 
 | |
| insert into casetest values (1, 1, 1, 1), (2, null, null, null), (3, 1, 1, null), (4, 1, null, null);
 | |
| select id, case when c1 is not null and c2 is not null and c3 is not null then 'A' when c1 is not null and c2 is 
 | |
| not null and c3 is null then 'B' when c1 is not null and c2 is null and c3 is not null then 'C' when c1 is not null 
 | |
| and c2 is null and c3 is null then 'D' end case_func from casetest;
 | |
| 
 | |
| --disable_warnings
 | |
| drop table casetest;
 | |
| --enable_warnings
 | |
| #
 | |
| 
 |