citusdata / citusdata/citus

INSERT INTO local SELECT .. FROM dist LIMIT .. is not pushing down the limit

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

Description

We should be able to push down the limit when we are inserting into a local table from a distributed table. Currently it is not the case:

schema:
```sql
create table local(a int, b int);
create table dist(a int, b int);
SELECT create_distributed_table('dist','a');
```

![image](https://user-images.githubusercontent.com/17179875/139704316-9cdfc17d-0e84-4ed7-8ecf-11e1d5329e2d.png)

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.