citusdata / citusdata/citus

citus_stat_tenants fails to record INSERTs for array type

Open
#6,858 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

```SQL

CREATE TABLE data_types_table
(
col1 int[]
);

SELECT create_distributed_table('data_types_table', 'col1');

SELECT citus_stat_tenants_reset();

-- ops, insert doesn't show up
insert into data_types_table VALUES (ARRAY[2]);
INSERT 0 1

select nodeid,colocation_id,tenant_attribute,query_count_in_this_period from citus_stat_tenants;
(0 rows)

-- update/delete/select shows up
SELECT * FROM data_types_table WHERE col1 = ARRAY[2];
DELETE FROM data_types_table WHERE col1 = ARRAY[2];
UPDATE data_types_table SET col1 = ARRAY[2] WHERE col1 = ARRAY[2];

-[ RECORD 1 ]--------------+----
nodeid | 1
colocation_id | 5
tenant_attribute | {2}
query_count_in_this_period | 3
```

I think we should play with the types here a bit more to check for such cases: https://github.com/citusdata/citus/blob/3286ec59e91e2fe4bf7cb3a63df55d9f4266e3d8/src/test/regress/sql/data_types.sql#L12

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.