You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-11-03 17:13:17 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			51 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# -------------------------------------------------------------- #
 | 
						|
# Test case migrated from regression test suite: MCOL-3839.sql
 | 
						|
#
 | 
						|
# Author: Daniel Lee, daniel.lee@mariadb.com
 | 
						|
# -------------------------------------------------------------- #
 | 
						|
#
 | 
						|
--source ../include/have_columnstore.inc
 | 
						|
#
 | 
						|
USE tpch1;
 | 
						|
#
 | 
						|
--disable_warnings
 | 
						|
drop table if exists test_wf_count_with_constants;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
create table test_wf_count_with_constants (t1 int) engine=columnstore;
 | 
						|
insert into test_wf_count_with_constants values (1);
 | 
						|
select count(null) over () from test_wf_count_with_constants;
 | 
						|
select count(5) over () from test_wf_count_with_constants;
 | 
						|
 | 
						|
#-- make sure count(*) count(field) are not broken
 | 
						|
select count(*) from test_wf_count_with_constants;
 | 
						|
select count(t1) from test_wf_count_with_constants;
 | 
						|
 | 
						|
 | 
						|
insert into test_wf_count_with_constants values (3);
 | 
						|
select count(null) over () from test_wf_count_with_constants;
 | 
						|
select count(5) over () from test_wf_count_with_constants;
 | 
						|
 | 
						|
#-- make sure count(*) count(field) are not broken
 | 
						|
select count(*) from test_wf_count_with_constants;
 | 
						|
select count(t1) from test_wf_count_with_constants;
 | 
						|
 | 
						|
#-- test with partition by
 | 
						|
select count(5) over(partition by t1)  from test_wf_count_with_constants;
 | 
						|
select count(*) over(partition by t1)  from test_wf_count_with_constants;
 | 
						|
select count(null) over(partition by t1)  from test_wf_count_with_constants;
 | 
						|
 | 
						|
#-- test with different frames
 | 
						|
select count(5) over(order by t1 rows between unbounded preceding and current row exclude no others)  from test_wf_count_with_constants;
 | 
						|
select count(*) over(order by t1 rows between unbounded preceding and current row exclude no others)  from test_wf_count_with_constants;
 | 
						|
select count(null) over(order by t1 rows between unbounded preceding and current row exclude no others)  from test_wf_count_with_constants;
 | 
						|
select count(5) over(order by t1 rows between current row and unbounded following)  from test_wf_count_with_constants;
 | 
						|
select count(*) over(order by t1 rows between current row and unbounded following)  from test_wf_count_with_constants;
 | 
						|
select count(null) over(order by t1 rows between current row and unbounded following)  from test_wf_count_with_constants;
 | 
						|
 | 
						|
--disable_warnings
 | 
						|
drop table test_wf_count_with_constants;
 | 
						|
--enable_warnings
 | 
						|
#
 | 
						|
 |