citusdata / citusdata/citus

Intermediate result doesn't accept pseudo-type anyarray

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

Description

Steps to reproduce:
``` SQL
CREATE TABLE dist_table (id int);
SELECT create_distributed_table('dist_table', 'id');

SELECT count(*) FROM dist_table
WHERE EXISTS (SELECT count(*) FROM pg_catalog.pg_stats_ext_exprs);

NOTICE: executing the command locally: SELECT count(*) AS count FROM
(SELECT intermediate_result.schemaname, intermediate_result.tablename, intermediate_result.statistics_schemaname,
intermediate_result.statistics_name, intermediate_result.statistics_owner, intermediate_result.expr, intermediate_result.inherited,
intermediate_result.null_frac, intermediate_result.avg_width, intermediate_result.n_distinct, intermediate_result.most_common_vals,
intermediate_result.most_common_freqs, intermediate_result.histogram_bounds, intermediate_result.correlation,
intermediate_result.most_common_elems, intermediate_result.most_common_elem_freqs, intermediate_result.elem_count_histogram FROM
read_intermediate_result('109_1'::text, 'binary'::citus_copy_format) intermediate_result(schemaname name, tablename name, statistics_schemaname name,
statistics_name name, statistics_owner name, expr text, inherited boolean, null_frac real, avg_width integer, n_distinct real,
most_common_vals anyarray, most_common_freqs real[], histogram_bounds anyarray, correlation real,
most_common_elems anyarray, most_common_elem_freqs real[], elem_count_histogram real[])) pg_stats_ext_exprs

ERROR: column "most_common_elems" has pseudo-type anyarray
```

In general, one can't create a table with pseudo-type, so there may be no way to fix this after all:
```sql
CREATE TABLE local_anyarray AS SELECT most_common_elems FROM pg_catalog.pg_stats_ext_exprs;
ERROR: column "most_common_elems" has pseudo-type anyarray
```

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.