Consider relaxing "query execution" checks on the shards when functions pushed down to the shards
Open
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
@marcocitus reported:
```SQL
CREATE SCHEMA table_1;
CREATE TABLE table_1.test(a int);
SELECT create_distributed_table('table_1.test', 'a');
INSERT INTO table_1.test SELECT i FROM generate_series(0,100000)i;
CREATE OR REPLACE FUNCTION some_func() RETURNS integer
AS 'select count(*) FROM table_1.test;'
LANGUAGE SQL
VOLATILE
RETURNS NULL ON NULL INPUT;
SELECT some_func() FROM table_1.test;
ERROR: cannot execute a distributed query from a query on a shard
CONTEXT: SQL function "some_func" statement 1
```
Contributor guide
Assessment
This issue has not been assessed yet.