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

fix partition table with partition column name date #1892

Conversation

marsishandsome
Copy link
Collaborator

What problem does this PR solve?

fix https://asktug.com/t/topic/67814/6

What is changed and how it works?

partition column name should wrapped with `

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to update the tidb-ansible repository
  • Need to be included in the release note

@marsishandsome marsishandsome added needs-cherry-pick-master PR which needs to be cherry-picked to master needs-cherry-pick-release-2.4 PR which needs to be cherry-picked to release-2.4 labels Jan 27, 2021
@marsishandsome marsishandsome force-pushed the feature/fix-partition-table-with-col-date branch from 6319900 to fa02f75 Compare January 27, 2021 04:55
@marsishandsome
Copy link
Collaborator Author

/run-all-tests

@marsishandsome
Copy link
Collaborator Author

/run-all-tests tikv=v4.0.9 tidb=v4.0.9 pd=v4.0.9

@marsishandsome
Copy link
Collaborator Author

/run-all-tests tikv=v4.0.8 tidb=v4.0.8 pd=v4.0.8

birdstorm
birdstorm previously approved these changes Jan 27, 2021
Copy link
Contributor

@birdstorm birdstorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marsishandsome
Copy link
Collaborator Author

/run-all-tests tikv=v4.0.8 tidb=v4.0.8 pd=v4.0.8

1 similar comment
@marsishandsome
Copy link
Collaborator Author

/run-all-tests tikv=v4.0.8 tidb=v4.0.8 pd=v4.0.8

@marsishandsome marsishandsome force-pushed the feature/fix-partition-table-with-col-date branch from 300100a to adefe97 Compare January 27, 2021 07:51
@marsishandsome
Copy link
Collaborator Author

/run-all-tests tikv=v4.0.8 tidb=v4.0.8 pd=v4.0.8

2 similar comments
@marsishandsome
Copy link
Collaborator Author

/run-all-tests tikv=v4.0.8 tidb=v4.0.8 pd=v4.0.8

@marsishandsome
Copy link
Collaborator Author

/run-all-tests tikv=v4.0.8 tidb=v4.0.8 pd=v4.0.8

@marsishandsome marsishandsome force-pushed the feature/fix-partition-table-with-col-date branch from 688d10c to 1c0093a Compare January 28, 2021 03:53
@marsishandsome
Copy link
Collaborator Author

/run-all-tests

@marsishandsome
Copy link
Collaborator Author

/run-all-tests tikv=v4.0.8 tidb=v4.0.8 pd=v4.0.8

@marsishandsome
Copy link
Collaborator Author

/run-all-tests

@marsishandsome
Copy link
Collaborator Author

/run-all-tests tikv=v4.0.8 tidb=v4.0.8 pd=v4.0.8

@ti-srebot
Copy link
Collaborator

cherry pick to release-2.4 in PR #1899

@ti-srebot
Copy link
Collaborator

cherry pick to master in PR #1900

private static String wrapColumnName(String columnName) {
if (columnName.startsWith("`") && columnName.endsWith("`")) {
return columnName;
} else if (columnName.contains("(") && columnName.contains(")")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if columnName = a + b?

Copy link
Collaborator Author

@marsishandsome marsishandsome Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wfxxh pushed a commit to wanfangdata/tispark that referenced this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-master PR which needs to be cherry-picked to master needs-cherry-pick-release-2.4 PR which needs to be cherry-picked to release-2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants