Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

lightning: evaluate all generated columns even if they are virtual (#1407) #1417

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #1407

What problem does this PR solve?

Fix #1404

What is changed and how it works?

Expression indices rely on a virtual generated column, which is not calculated by Lightning (unless depended by a stored generated column). This caused the virtual generated column to contain invalid value and thus invalidate the index.

This PR just calculates all generated columns no matter they are virtual or stored.

Check List

Tests

  • Integration test

Code changes

Side effects

  • Possible performance regression
    • Tables with only virtual generated columns will experience longer encoding time.

Related changes

  • Need to cherry-pick to the release branch
    • release-4.0, 5.0, 5.1 (everywhere that creating an index on virtual generated column is allowed)

Release note

  • Expression index and index depending on virtual generated columns are now valid. Previously these indices are broken when importing through Lightning local or importer backend.

@ti-chi-bot
Copy link
Member Author

ti-chi-bot commented Aug 6, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • glorv
  • kennytm

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.

@kennytm
Copy link
Collaborator

kennytm commented Aug 12, 2021

/run-integration-test

@ti-chi-bot ti-chi-bot added the status/LGT1 LGTM1 label Aug 13, 2021
@kennytm
Copy link
Collaborator

kennytm commented Jan 26, 2022

/merge

@ti-chi-bot
Copy link
Member Author

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

Commit hash: c4329dc

@ti-chi-bot
Copy link
Member Author

@ti-chi-bot: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@kennytm
Copy link
Collaborator

kennytm commented Feb 8, 2022

/build

@ti-chi-bot ti-chi-bot merged commit 3ac0ac1 into pingcap:release-5.1 Feb 8, 2022
@zhouqiang-cl zhouqiang-cl added this to the v5.1.4 milestone Feb 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants