Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick from Greenplum: [ORCA] Avoid pushdown of predicate with set-returning function (#14201) #715

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

foreyes
Copy link
Contributor

@foreyes foreyes commented Nov 19, 2024

Cherry-pick ORCA commits from GreenPlum

dgkimura and others added 2 commits November 22, 2024 10:12
Issue is that if a predicate with a set-returning function is pushed
down then it can lead to bad execution because there exist cases where
the below context cannot accept a set. Logic already existed to prevent
such a case, but it wasn't sufficient.

Following example demonstrates such a case:
  ```sql
  CREATE TABLE t(a int[]) ;
  INSERT INTO t VALUES (ARRAY[1, 2]);

  SELECT * FROM (SELECT unnest(t1.a) a_unnest FROM t t1, t t2) s WHERE a_unnest IS NOT NULL;
  ```

Also similarly, do not push down a filter through a projected column
containing a subquery.
Copy link
Contributor

@jiaqizho jiaqizho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pls add some the commit message in Fix cherry-pick test failure for cbdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants