tispark icon indicating copy to clipboard operation
tispark copied to clipboard

fix bug error will be throw when date col is not the first col in hash partition table ref #2537 (#2554)

Open ti-chi-bot opened this issue 2 years ago • 2 comments

This is an automated cherry-pick of #2554

Signed-off-by: qidi1 [email protected]

What problem does this PR solve?

  • Close https://github.com/pingcap/tispark/issues/2537

What is changed and how it works?

When we insert data into a table which is partitioned by Year. The old code will always use 0 as a col offset to get the date value. When the date type is not the first col, the exception will be thrown out. Now, we use date col offset in columnRef insert of 0 as the offset to get the date value.

ti-chi-bot avatar Sep 23 '22 06:09 ti-chi-bot

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • shiyuhang0
  • xuanyu66

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.

ti-chi-bot avatar Sep 23 '22 06:09 ti-chi-bot

/run-all-tests

xuanyu66 avatar Sep 23 '22 06:09 xuanyu66

/run-all-tests

shiyuhang0 avatar Sep 23 '22 07:09 shiyuhang0

/merge

shiyuhang0 avatar Sep 23 '22 08:09 shiyuhang0

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

Commit hash: 8cdee45e2446c4f2e0d86b612d17aa1c708cd069

ti-chi-bot avatar Sep 23 '22 08:09 ti-chi-bot