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

support partition pruning on range columns partition #1337

Merged
merged 8 commits into from Jan 6, 2020

Conversation

@zhexuany
Copy link
Member

zhexuany commented Dec 27, 2019

What problem does this PR solve?

This PR wants to support partition pruning on range column.

What is changed and how it works?

When a partition is range column, lessThan of PartitionDefitions will be at least one. The expr of PartitionInfo is an empty string. We cannot generate partition expression by only looking at expr like we said early: it is empty string. We need iterate all columns and lessThan to generate partition expression.

Range Columns partition cannot accept expression but column's name. Additionally, the type of column is limited to int, or datetime related types. In order to build range, I change the logic of building range from building a long range to typedKey range.

Check List

Tests

  • Integration test
@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Dec 27, 2019

This PR cannot merge right now unless #1327 got merged first.

@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Dec 27, 2019

This PR closes #1337

@zhexuany zhexuany changed the title Fix part pruning on date support partition pruning on range columns partition Dec 28, 2019
@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Dec 30, 2019

/run-all-tests mode=full

@zhexuany zhexuany force-pushed the zhexuany:fix_part_pruning_on_date branch from 22c7068 to 956f809 Dec 30, 2019
Copy link
Member

birdstorm left a comment

LGTM

@birdstorm

This comment has been minimized.

Copy link
Member

birdstorm commented Dec 31, 2019

/run-all-tests mode=full

1 similar comment
@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Jan 2, 2020

/run-all-tests mode=full

@marsishandsome

This comment has been minimized.

Copy link
Collaborator

marsishandsome commented Jan 2, 2020

/run-all-tests mode=full

2 similar comments
@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Jan 2, 2020

/run-all-tests mode=full

@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Jan 2, 2020

/run-all-tests mode=full

Copy link
Member

birdstorm left a comment

LGTM

@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Jan 3, 2020

/run-all-tests mode=full

@zhexuany zhexuany force-pushed the zhexuany:fix_part_pruning_on_date branch from bfad5f7 to 951e3c1 Jan 3, 2020
@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Jan 3, 2020

/run-all-tests mode=full

@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Jan 3, 2020

/run-all-tests mode=full tikv=v3.0.8

@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Jan 3, 2020

/run-all-tests tikv=v3.0.5 tidb=v3.0.5 pd=v3.0.5 mode=full

Copy link
Collaborator

marsishandsome left a comment

LGTM

@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Jan 3, 2020

/run-all-tests tikv=v3.0.8 tidb=v3.0.8 pd=v3.0.8 mode=full

@zhexuany zhexuany force-pushed the zhexuany:fix_part_pruning_on_date branch from b19c0db to 0da57a2 Jan 6, 2020
@zhexuany

This comment has been minimized.

Copy link
Member Author

zhexuany commented Jan 6, 2020

/run-all-tests mode=full

@zhexuany zhexuany merged commit 4d03cb2 into pingcap:master Jan 6, 2020
3 checks passed
3 checks passed
idc-jenkins-ci-tispark/build Jenkins job succeeded.
Details
idc-jenkins-ci-tispark/integration-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
@zhexuany zhexuany deleted the zhexuany:fix_part_pruning_on_date branch Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.