pingcap / tispark

TiSpark is built for running Apache Spark on top of TiDB/TiKV
Apache License 2.0
880 stars 244 forks source link

Fix read from range column partition table error (#2639) #2654

Closed ti-chi-bot closed 1 year ago

ti-chi-bot commented 1 year ago

This is an automated cherry-pick of #2639

What problem does this PR solve?

close #2638

What is changed and how it works?

  1. Fix the output of explain: TiSpark no more throw NoSuchElementException when there is no partition after partition prune.

  2. Fix the part of the bug that no partitions will be selected in the range column partition table.

    TiSpark will contain '' when generates partition exprs. For example, if your DDL is PARTITION p1 VALUES LESS THAN ('CN001'), you will get something like ${column_name} less than "'CN001'". Then, your filter can not match the partition exprs.

After Fix, TiSpark will convert

ti-chi-bot commented 1 year ago

[REVIEW NOTIFICATION]

This pull request has been approved by:

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment. After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review.
shiyuhang0 commented 1 year ago

/run-all-tests

shiyuhang0 commented 1 year ago

/merge

ti-chi-bot commented 1 year ago

@shiyuhang0: /merge in this pull request requires 2 approval(s).

In response to [this](https://github.com/pingcap/tispark/pull/2654#issuecomment-1475558769): >/merge Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.
shiyuhang0 commented 1 year ago

/merge

ti-chi-bot commented 1 year ago

This pull request has been accepted and is ready to merge.

Commit hash: 2172a04ebed4f7b430f2849d61022fcbf395fdfb