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 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			750 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			750 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# -------------------------------------------------------------- #
 | 
						|
# Test case migrated from regression test suite: MCOL-2091.sql
 | 
						|
#
 | 
						|
# Author: Daniel Lee, daniel.lee@mariadb.com
 | 
						|
# -------------------------------------------------------------- #
 | 
						|
#
 | 
						|
--source ../include/have_columnstore.inc
 | 
						|
#
 | 
						|
USE tpch1;
 | 
						|
#
 | 
						|
--disable_warnings
 | 
						|
CREATE AGGREGATE FUNCTION IF NOT EXISTS avg_mode returns REAL soname 'libudf_mysql.so';
 | 
						|
drop table if exists t1;
 | 
						|
--enable_warnings
 | 
						|
create table t1 (c1 int, c2 int, c3 int, c4 int)engine=columnstore;
 | 
						|
insert into t1 values (1,2,3,4),(1,2,3,4),(1,2,3,4),(1,2,3,4);
 | 
						|
select  c1,count(distinct c2) as c2,count(distinct c3) as c3, avg_mode(c4) as c4 from t1 group by c1;
 | 
						|
 | 
						|
--disable_warnings
 | 
						|
drop table if exists t1;
 | 
						|
--enable_warnings
 | 
						|
#
 |