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

make partition pruning works on simple partition expr #563

Open
zhexuany opened this issue Feb 13, 2019 · 0 comments
Open

make partition pruning works on simple partition expr #563

zhexuany opened this issue Feb 13, 2019 · 0 comments

Comments

@zhexuany
Copy link
Contributor

For a table p_t with schema 

CREATE TABLE `p_t` (
 `id` int(11) DEFAULT NULL,
 `name` varchar(50) DEFAULT NULL,
 `y` date DEFAULT NULL,
 index `idx_y`(`y`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
PARTITION BY RANGE ( id ) (
 PARTITION p0 VALUES LESS THAN (2),
 PARTITION p1 VALUES LESS THAN (4),
 PARTITION p2 VALUES LESS THAN (6)
)

 

select * from p_t where id < 4 and id > 3 should only access partition p1. 

 

In this Jira issue, complex partition expression such as year(purchased) where purchased is date will be discarded.

 

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

No branches or pull requests

2 participants