mirror of https://github.com/citusdata/citus.git
more test fixes
parent
e26fdeb706
commit
7169ba21c4
|
@ -1,5 +1,5 @@
|
||||||
--
|
--
|
||||||
-- Test the CREATE statements related to cstore.
|
-- Test the CREATE statements related to columnar.
|
||||||
--
|
--
|
||||||
-- Create uncompressed table
|
-- Create uncompressed table
|
||||||
CREATE TABLE contestant (handle TEXT, birthdate DATE, rating INT,
|
CREATE TABLE contestant (handle TEXT, birthdate DATE, rating INT,
|
||||||
|
|
|
@ -101,7 +101,7 @@ SELECT * FROM matview ORDER BY a;
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
-- test we retained options
|
-- test we retained options
|
||||||
SELECT * FROM cstore.options WHERE regclass = 'test_options_1'::regclass;
|
SELECT * FROM columnar.options WHERE regclass = 'test_options_1'::regclass;
|
||||||
regclass | chunk_row_count | stripe_row_count | compression
|
regclass | chunk_row_count | stripe_row_count | compression
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
test_options_1 | 1000 | 5000 | pglz
|
test_options_1 | 1000 | 5000 | pglz
|
||||||
|
@ -121,7 +121,7 @@ SELECT count(*), sum(a), sum(b) FROM test_options_1;
|
||||||
10000 | 50005000 | 45010
|
10000 | 50005000 | 45010
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT * FROM cstore.options WHERE regclass = 'test_options_2'::regclass;
|
SELECT * FROM columnar.options WHERE regclass = 'test_options_2'::regclass;
|
||||||
regclass | chunk_row_count | stripe_row_count | compression
|
regclass | chunk_row_count | stripe_row_count | compression
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
test_options_2 | 2000 | 6000 | none
|
test_options_2 | 2000 | 6000 | none
|
||||||
|
|
|
@ -115,9 +115,9 @@ SELECT :relfilenode_pre_alter <> :relfilenode_post_alter AS relfilenode_changed;
|
||||||
--
|
--
|
||||||
-- Test that we retain options
|
-- Test that we retain options
|
||||||
--
|
--
|
||||||
SET cstore.stripe_row_count TO 5000;
|
SET columnar.stripe_row_count TO 5000;
|
||||||
SET cstore.chunk_row_count TO 1000;
|
SET columnar.chunk_row_count TO 1000;
|
||||||
SET cstore.compression TO 'pglz';
|
SET columnar.compression TO 'pglz';
|
||||||
CREATE TABLE test_options_1(a int, b int) USING columnar;
|
CREATE TABLE test_options_1(a int, b int) USING columnar;
|
||||||
INSERT INTO test_options_1 SELECT i, floor(i/1000) FROM generate_series(1, 10000) i;
|
INSERT INTO test_options_1 SELECT i, floor(i/1000) FROM generate_series(1, 10000) i;
|
||||||
CREATE TABLE test_options_2(a int, b int) USING columnar;
|
CREATE TABLE test_options_2(a int, b int) USING columnar;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--
|
--
|
||||||
-- Test loading data into cstore_fdw tables.
|
-- Test loading data into columnar tables.
|
||||||
--
|
--
|
||||||
|
|
||||||
-- COPY with incorrect delimiter
|
-- COPY with incorrect delimiter
|
||||||
|
@ -16,13 +16,13 @@ COPY contestant FROM '@abs_srcdir@/data/contestants.1.csv' WITH CSV;
|
||||||
COPY contestant FROM PROGRAM 'cat @abs_srcdir@/data/contestants.2.csv' WITH CSV;
|
COPY contestant FROM PROGRAM 'cat @abs_srcdir@/data/contestants.2.csv' WITH CSV;
|
||||||
|
|
||||||
-- COPY into compressed table
|
-- COPY into compressed table
|
||||||
set cstore.compression = 'pglz';
|
set columnar.compression = 'pglz';
|
||||||
COPY contestant_compressed FROM '@abs_srcdir@/data/contestants.1.csv' WITH CSV;
|
COPY contestant_compressed FROM '@abs_srcdir@/data/contestants.1.csv' WITH CSV;
|
||||||
|
|
||||||
-- COPY into uncompressed table from program
|
-- COPY into uncompressed table from program
|
||||||
COPY contestant_compressed FROM PROGRAM 'cat @abs_srcdir@/data/contestants.2.csv'
|
COPY contestant_compressed FROM PROGRAM 'cat @abs_srcdir@/data/contestants.2.csv'
|
||||||
WITH CSV;
|
WITH CSV;
|
||||||
set cstore.compression to default;
|
set columnar.compression to default;
|
||||||
|
|
||||||
-- Test column list
|
-- Test column list
|
||||||
CREATE TABLE famous_constants (id int, name text, value real)
|
CREATE TABLE famous_constants (id int, name text, value real)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--
|
--
|
||||||
-- Test loading data into cstore_fdw tables.
|
-- Test loading data into columnar tables.
|
||||||
--
|
--
|
||||||
-- COPY with incorrect delimiter
|
-- COPY with incorrect delimiter
|
||||||
COPY contestant FROM '@abs_srcdir@/data/contestants.1.csv'
|
COPY contestant FROM '@abs_srcdir@/data/contestants.1.csv'
|
||||||
|
@ -15,12 +15,12 @@ COPY contestant FROM '@abs_srcdir@/data/contestants.1.csv' WITH CSV;
|
||||||
-- COPY into uncompressed table from program
|
-- COPY into uncompressed table from program
|
||||||
COPY contestant FROM PROGRAM 'cat @abs_srcdir@/data/contestants.2.csv' WITH CSV;
|
COPY contestant FROM PROGRAM 'cat @abs_srcdir@/data/contestants.2.csv' WITH CSV;
|
||||||
-- COPY into compressed table
|
-- COPY into compressed table
|
||||||
set cstore.compression = 'pglz';
|
set columnar.compression = 'pglz';
|
||||||
COPY contestant_compressed FROM '@abs_srcdir@/data/contestants.1.csv' WITH CSV;
|
COPY contestant_compressed FROM '@abs_srcdir@/data/contestants.1.csv' WITH CSV;
|
||||||
-- COPY into uncompressed table from program
|
-- COPY into uncompressed table from program
|
||||||
COPY contestant_compressed FROM PROGRAM 'cat @abs_srcdir@/data/contestants.2.csv'
|
COPY contestant_compressed FROM PROGRAM 'cat @abs_srcdir@/data/contestants.2.csv'
|
||||||
WITH CSV;
|
WITH CSV;
|
||||||
set cstore.compression to default;
|
set columnar.compression to default;
|
||||||
-- Test column list
|
-- Test column list
|
||||||
CREATE TABLE famous_constants (id int, name text, value real)
|
CREATE TABLE famous_constants (id int, name text, value real)
|
||||||
USING columnar;
|
USING columnar;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--
|
--
|
||||||
-- Test the CREATE statements related to cstore.
|
-- Test the CREATE statements related to columnar.
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,11 +31,11 @@ SELECT * FROM test_alter_type ORDER BY a;
|
||||||
SELECT * FROM matview ORDER BY a;
|
SELECT * FROM matview ORDER BY a;
|
||||||
|
|
||||||
-- test we retained options
|
-- test we retained options
|
||||||
SELECT * FROM cstore.options WHERE regclass = 'test_options_1'::regclass;
|
SELECT * FROM columnar.options WHERE regclass = 'test_options_1'::regclass;
|
||||||
VACUUM VERBOSE test_options_1;
|
VACUUM VERBOSE test_options_1;
|
||||||
SELECT count(*), sum(a), sum(b) FROM test_options_1;
|
SELECT count(*), sum(a), sum(b) FROM test_options_1;
|
||||||
|
|
||||||
SELECT * FROM cstore.options WHERE regclass = 'test_options_2'::regclass;
|
SELECT * FROM columnar.options WHERE regclass = 'test_options_2'::regclass;
|
||||||
VACUUM VERBOSE test_options_2;
|
VACUUM VERBOSE test_options_2;
|
||||||
SELECT count(*), sum(a), sum(b) FROM test_options_2;
|
SELECT count(*), sum(a), sum(b) FROM test_options_2;
|
||||||
|
|
||||||
|
|
|
@ -95,9 +95,9 @@ SELECT :relfilenode_pre_alter <> :relfilenode_post_alter AS relfilenode_changed;
|
||||||
-- Test that we retain options
|
-- Test that we retain options
|
||||||
--
|
--
|
||||||
|
|
||||||
SET cstore.stripe_row_count TO 5000;
|
SET columnar.stripe_row_count TO 5000;
|
||||||
SET cstore.chunk_row_count TO 1000;
|
SET columnar.chunk_row_count TO 1000;
|
||||||
SET cstore.compression TO 'pglz';
|
SET columnar.compression TO 'pglz';
|
||||||
|
|
||||||
CREATE TABLE test_options_1(a int, b int) USING columnar;
|
CREATE TABLE test_options_1(a int, b int) USING columnar;
|
||||||
INSERT INTO test_options_1 SELECT i, floor(i/1000) FROM generate_series(1, 10000) i;
|
INSERT INTO test_options_1 SELECT i, floor(i/1000) FROM generate_series(1, 10000) i;
|
||||||
|
|
Loading…
Reference in New Issue