Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

restore: fix several bugs related to column permutations #437

Merged
merged 6 commits into from
Nov 4, 2020

Conversation

glorv
Copy link
Contributor

@glorv glorv commented Oct 31, 2020

What problem does this PR solve?

Fix follow bugs:

  • load wrong number of column permutation for file checkpoint
  • incorrect column names fetch from column permutation, this will cause tidb encoded generates row table columns if the csv head order is different from table schema
  • tidb encoder use wrong field info to encode field

close #438

What is changed and how it works?

Check List

Tests

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

Side effects

Related changes

@kennytm
Copy link
Collaborator

kennytm commented Oct 31, 2020

the new test failed

[2020-10-31T08:52:30.160Z] ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 87 near "'select fund_seq_no, region_code, credit_code from test.test_perm WHERE contract_no = '2020061000019011020164030597';" 

Copy link
Collaborator

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

rest LGTM

tests/column_permutation/data/test.test_perm-schema.sql Outdated Show resolved Hide resolved
tests/column_permutation/data/test-schema-create.sql Outdated Show resolved Hide resolved
@glorv
Copy link
Contributor Author

glorv commented Oct 31, 2020

/run-all-tests

@kennytm kennytm added the status/LGT1 One reviewer already commented LGTM (LGTM1) label Nov 2, 2020
@overvenus
Copy link
Member

LGTM

@overvenus overvenus added status/LGT2 Two reviewers already commented LGTM, ready for merge (LGTM2) and removed status/LGT1 One reviewer already commented LGTM (LGTM1) labels Nov 4, 2020
@overvenus overvenus added this to the 4.0.9 milestone Nov 4, 2020
@glorv glorv merged commit eb609ec into master Nov 4, 2020
@glorv glorv deleted the fix-column-perm branch November 4, 2020 06:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/LGT2 Two reviewers already commented LGTM, ready for merge (LGTM2)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

restore csv files failed with tidb backend
3 participants