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

[YSQL] Support expression pushdown for DOMAIN types #26306

Open
1 task done
timothy-e opened this issue Mar 6, 2025 · 0 comments
Open
1 task done

[YSQL] Support expression pushdown for DOMAIN types #26306

timothy-e opened this issue Mar 6, 2025 · 0 comments
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage

Comments

@timothy-e
Copy link
Contributor

timothy-e commented Mar 6, 2025

Jira Link: DB-15652

Description

CREATE DOMAIN posint AS integer CHECK (VALUE > 0);
CREATE TABLE test_domain_tbl (d_col posint, i_col int);
INSERT INTO test_domain_tbl VALUES(1, 2);
EXPLAIN (COSTS OFF) SELECT * FROM test_domain_tbl WHERE d_col > 1 AND i_col > 1;
            QUERY PLAN
----------------------------------
 Seq Scan on test_domain_tbl
   Storage Filter: (i_col > 1)
   Filter: ((d_col)::integer > 1)
(3 rows)

It is reasonable for the expression pushdown code to look at the type contained by the domain, and if that is a pushable type, push the expression.

Issue Type

kind/enhancement

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@timothy-e timothy-e added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Mar 6, 2025
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue labels Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage
Projects
None yet
Development

No branches or pull requests

2 participants