mirror of https://github.com/citusdata/citus.git
Fix #4608
parent
877d87e372
commit
bcb162976f
|
@ -164,7 +164,7 @@ columnar_beginscan(Relation relation, Snapshot snapshot,
|
||||||
parallel_scan,
|
parallel_scan,
|
||||||
flags, attr_needed, NULL);
|
flags, attr_needed, NULL);
|
||||||
|
|
||||||
pfree(attr_needed);
|
bms_free(attr_needed);
|
||||||
|
|
||||||
return scandesc;
|
return scandesc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1067,5 +1067,31 @@ SELECT 1 FROM master_remove_node('localhost', :master_port);
|
||||||
1
|
1
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
-- verify reference table with no columns can be created
|
||||||
|
-- https://github.com/citusdata/citus/issues/4608
|
||||||
|
CREATE TABLE zero_col() USING columnar;
|
||||||
|
SELECT create_reference_table('zero_col');
|
||||||
|
create_reference_table
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
select result from run_command_on_placements('zero_col', 'select count(*) from %s');
|
||||||
|
result
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
0
|
||||||
|
0
|
||||||
|
(2 rows)
|
||||||
|
|
||||||
|
-- add a column so we can ad some data
|
||||||
|
ALTER TABLE zero_col ADD COLUMN a int;
|
||||||
|
INSERT INTO zero_col SELECT i FROM generate_series(1, 10) i;
|
||||||
|
select result from run_command_on_placements('zero_col', 'select count(*) from %s');
|
||||||
|
result
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
10
|
||||||
|
10
|
||||||
|
(2 rows)
|
||||||
|
|
||||||
SET client_min_messages TO WARNING;
|
SET client_min_messages TO WARNING;
|
||||||
DROP SCHEMA columnar_citus_integration CASCADE;
|
DROP SCHEMA columnar_citus_integration CASCADE;
|
||||||
|
|
|
@ -403,5 +403,15 @@ SELECT compression FROM columnar.options WHERE regclass = 'table_option_citus_lo
|
||||||
DROP TABLE table_option_citus_local, table_option_citus_local_2;
|
DROP TABLE table_option_citus_local, table_option_citus_local_2;
|
||||||
SELECT 1 FROM master_remove_node('localhost', :master_port);
|
SELECT 1 FROM master_remove_node('localhost', :master_port);
|
||||||
|
|
||||||
|
-- verify reference table with no columns can be created
|
||||||
|
-- https://github.com/citusdata/citus/issues/4608
|
||||||
|
CREATE TABLE zero_col() USING columnar;
|
||||||
|
SELECT create_reference_table('zero_col');
|
||||||
|
select result from run_command_on_placements('zero_col', 'select count(*) from %s');
|
||||||
|
-- add a column so we can ad some data
|
||||||
|
ALTER TABLE zero_col ADD COLUMN a int;
|
||||||
|
INSERT INTO zero_col SELECT i FROM generate_series(1, 10) i;
|
||||||
|
select result from run_command_on_placements('zero_col', 'select count(*) from %s');
|
||||||
|
|
||||||
SET client_min_messages TO WARNING;
|
SET client_min_messages TO WARNING;
|
||||||
DROP SCHEMA columnar_citus_integration CASCADE;
|
DROP SCHEMA columnar_citus_integration CASCADE;
|
||||||
|
|
Loading…
Reference in New Issue