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
feature: pron (#2908)
* feature: Special dictionary, we can pass with session veriable to modify codepaths and behaviour for testing and debugging
This commit is contained in:
36
mysql-test/columnstore/basic/r/pron.result
Normal file
36
mysql-test/columnstore/basic/r/pron.result
Normal file
@ -0,0 +1,36 @@
|
||||
DROP DATABASE IF EXISTS pron;
|
||||
CREATE DATABASE pron;
|
||||
USE pron;
|
||||
CREATE TABLE t
|
||||
(
|
||||
a double
|
||||
) ENGINE=Columnstore;
|
||||
INSERT INTO t VALUES(1.5707963267948966);
|
||||
SHOW variables like 'columnstore_pron';
|
||||
Variable_name Value
|
||||
columnstore_pron
|
||||
SELECT sin(a) from t;
|
||||
sin(a)
|
||||
1
|
||||
SET columnstore_pron='{"megasinus": "123"}';
|
||||
SHOW variables like 'columnstore_pron';
|
||||
Variable_name Value
|
||||
columnstore_pron {"megasinus": "123"}
|
||||
SELECT sin(a) from t;
|
||||
sin(a)
|
||||
123
|
||||
SET columnstore_pron='{"megasinus": "-200"}';
|
||||
SHOW variables like 'columnstore_pron';
|
||||
Variable_name Value
|
||||
columnstore_pron {"megasinus": "-200"}
|
||||
SELECT sin(a) from t;
|
||||
sin(a)
|
||||
-200
|
||||
SET columnstore_pron='';
|
||||
SHOW variables like 'columnstore_pron';
|
||||
Variable_name Value
|
||||
columnstore_pron
|
||||
SELECT sin(a) from t;
|
||||
sin(a)
|
||||
1
|
||||
DROP DATABASE pron;
|
36
mysql-test/columnstore/basic/t/pron.test
Normal file
36
mysql-test/columnstore/basic/t/pron.test
Normal file
@ -0,0 +1,36 @@
|
||||
# Here we test the usage of columnstore_pron dictionary
|
||||
# Sine function has codepath checking the value of megasinus
|
||||
# just for exmaple. Maybe deleted after another proper usages
|
||||
|
||||
--source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS pron;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE pron;
|
||||
USE pron;
|
||||
|
||||
CREATE TABLE t
|
||||
(
|
||||
a double
|
||||
) ENGINE=Columnstore;
|
||||
|
||||
INSERT INTO t VALUES(1.5707963267948966);
|
||||
|
||||
SHOW variables like 'columnstore_pron';
|
||||
SELECT sin(a) from t;
|
||||
|
||||
SET columnstore_pron='{"megasinus": "123"}';
|
||||
SHOW variables like 'columnstore_pron';
|
||||
SELECT sin(a) from t;
|
||||
|
||||
SET columnstore_pron='{"megasinus": "-200"}';
|
||||
SHOW variables like 'columnstore_pron';
|
||||
SELECT sin(a) from t;
|
||||
|
||||
SET columnstore_pron='';
|
||||
SHOW variables like 'columnstore_pron';
|
||||
SELECT sin(a) from t;
|
||||
|
||||
DROP DATABASE pron;
|
Reference in New Issue
Block a user