You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
feat(PrimProc): MCOL-5852 disk-based GROUP_CONCAT & JSON_ARRAYAGG
* move GROUP_CONCAT/JSON_ARRAYAGG storage to the RowGroup from the RowAggregation* * internal data structures (de)serialization * get rid of a specialized classes for processing JSON_ARRAYAGG * move the memory accounting to disk-based aggregation classes * allow aggregation generations to be used for queries with GROUP_CONCAT/JSON_ARRAYAGG * Remove the thread id from the error message as it interferes with the mtr
This commit is contained in:
committed by
Alexey Antipovsky
parent
87d47fd7ae
commit
4bea7e59a0
@ -0,0 +1,44 @@
|
||||
DROP DATABASE IF EXISTS mcol_5852;
|
||||
CREATE DATABASE mcol_5852;
|
||||
USE mcol_5852;
|
||||
CREATE TABLE gc (
|
||||
id INTEGER NOT NULL,
|
||||
longtxt TEXT NOT NULL
|
||||
) ENGINE=ColumnStore;
|
||||
SET max_recursive_iterations=100000;
|
||||
INSERT INTO gc (
|
||||
WITH RECURSIVE series AS (
|
||||
SELECT 1 AS id, REPEAT('=', 1024) AS longtxt
|
||||
UNION ALL
|
||||
SELECT id + 1 AS id, longtxt FROM series WHERE id < 50000
|
||||
) SELECT id, longtxt FROM series);
|
||||
SET columnstore_um_mem_limit=64;
|
||||
SELECT id, GROUP_CONCAT(longtxt) FROM gc GROUP BY 1 ORDER BY 1 LIMIT 10;
|
||||
ERROR HY000: Internal error: TupleAggregateStep::threadedAggregateRowGroups() MCS-2003: Aggregation/Distinct memory limit is exceeded.
|
||||
SET columnstore_um_mem_limit=512;
|
||||
SELECT id, GROUP_CONCAT(longtxt) FROM gc GROUP BY 1 ORDER BY 1 LIMIT 10;
|
||||
id GROUP_CONCAT(longtxt)
|
||||
1 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
2 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
3 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
4 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
5 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
6 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
7 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
8 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
9 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
10 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
SET columnstore_um_mem_limit=64;
|
||||
SELECT id, GROUP_CONCAT(longtxt) FROM gc GROUP BY 1 ORDER BY 1 LIMIT 10;
|
||||
id GROUP_CONCAT(longtxt)
|
||||
1 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
2 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
3 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
4 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
5 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
6 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
7 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
8 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
9 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
10 ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
DROP DATABASE mcol_5852;
|
@ -0,0 +1,36 @@
|
||||
--source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcol_5852;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcol_5852;
|
||||
USE mcol_5852;
|
||||
|
||||
CREATE TABLE gc (
|
||||
id INTEGER NOT NULL,
|
||||
longtxt TEXT NOT NULL
|
||||
) ENGINE=ColumnStore;
|
||||
|
||||
SET max_recursive_iterations=100000;
|
||||
INSERT INTO gc (
|
||||
WITH RECURSIVE series AS (
|
||||
SELECT 1 AS id, REPEAT('=', 1024) AS longtxt
|
||||
UNION ALL
|
||||
SELECT id + 1 AS id, longtxt FROM series WHERE id < 50000
|
||||
) SELECT id, longtxt FROM series);
|
||||
|
||||
SET columnstore_um_mem_limit=64;
|
||||
--exec /usr/bin/mcsSetConfig RowAggregation AllowDiskBasedAggregation N
|
||||
--error 1815
|
||||
SELECT id, GROUP_CONCAT(longtxt) FROM gc GROUP BY 1 ORDER BY 1 LIMIT 10;
|
||||
|
||||
SET columnstore_um_mem_limit=512;
|
||||
SELECT id, GROUP_CONCAT(longtxt) FROM gc GROUP BY 1 ORDER BY 1 LIMIT 10;
|
||||
|
||||
SET columnstore_um_mem_limit=64;
|
||||
--exec /usr/bin/mcsSetConfig RowAggregation AllowDiskBasedAggregation Y
|
||||
SELECT id, GROUP_CONCAT(longtxt) FROM gc GROUP BY 1 ORDER BY 1 LIMIT 10;
|
||||
|
||||
# cleanup
|
||||
DROP DATABASE mcol_5852;
|
Reference in New Issue
Block a user