You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4674 Fix ColumnStore to run MTR tests in a build directory
This commit is contained in:
23
mysql-test/columnstore/basic/t/mcs188_avg_function.test
Normal file
23
mysql-test/columnstore/basic/t/mcs188_avg_function.test
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Test AVG as distributed aggregate function
|
||||
# Author: Bharath, bharath.bokka@mariadb.com
|
||||
#
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcs188_db;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcs188_db;
|
||||
USE mcs188_db;
|
||||
|
||||
CREATE TABLE t1 (a INT, b CHAR(5))ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES (NULL, ''),(1, 'aaa'),(2, 'aaa'),(1, 'ccc'),(4, 'ddd'),(5, 'aaa'),(6, 'ddd'),(7, 'eee');
|
||||
|
||||
SELECT AVG(DISTINCT a) FROM t1;
|
||||
SELECT AVG(DISTINCT a) FROM t1 GROUP BY b HAVING b = 'aaa';
|
||||
SELECT b, AVG(DISTINCT a) FROM t1 GROUP BY b ORDER BY b DESC;
|
||||
SELECT AVG(a) FROM t1;
|
||||
|
||||
# Clean UP
|
||||
DROP DATABASE mcs188_db;
|
Reference in New Issue
Block a user