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

*: adjust solution for TOOL-1420 and add a test case #214

Merged
merged 2 commits into from
Jul 18, 2019

Conversation

kennytm
Copy link
Collaborator

@kennytm kennytm commented Jul 15, 2019

What problem does this PR solve?

Follow up to #210.

What is changed and how it works?

  1. Added a test case to verify the solution works.
  2. Moved the strings.ToLower() call from (*TableRestore).initializeColumns() to (*ChunkParser).ReadRow(). This is to match the behavior of the CSV parser.

colName, _ := parser.unescapeString(string(content))
parser.columns = append(parser.columns, strings.ToLower(colName))

Check List

Tests

  • Integration test

Side effects

Related changes

  • Need to cherry-pick to the release branch
    • Needs to cherry-pick to release-2.1.

Move the ToLower operation from (*TableRestore).initializeColumns() to
(*ChunkParser).ReadRow(). In fact this is the same as the CSV parser.
@kennytm kennytm added status/PTAL This PR is ready for review. Add this label back after committing new changes type/enhancement Performance improvement or refactoring type/test Changes test cases only Should Cherry-pick This PR should be cherry-picked back the previous release train labels Jul 15, 2019
@kennytm
Copy link
Collaborator Author

kennytm commented Jul 15, 2019

/run-all-tests

@kennytm
Copy link
Collaborator Author

kennytm commented Jul 16, 2019

PTAL @csuzhangxc @lance6716 cc @lonng

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

LGTM

@lance6716 lance6716 added status/LGT1 One reviewer already commented LGTM (LGTM1) and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Jul 16, 2019
@kennytm
Copy link
Collaborator Author

kennytm commented Jul 18, 2019

Ping @csuzhangxc

@kennytm kennytm requested a review from csuzhangxc July 18, 2019 05:14
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added status/LGT2 Two reviewers already commented LGTM, ready for merge (LGTM2) and removed status/LGT1 One reviewer already commented LGTM (LGTM1) labels Jul 18, 2019
@kennytm
Copy link
Collaborator Author

kennytm commented Jul 18, 2019

/run-all-tests

@kennytm kennytm merged commit 5218dd6 into master Jul 18, 2019
@kennytm kennytm deleted the kennytm/add-test-case-for-tool-1420 branch July 18, 2019 07:56
kennytm added a commit that referenced this pull request Jul 19, 2019
Move the ToLower operation from (*TableRestore).initializeColumns() to
(*ChunkParser).ReadRow(). In fact this is the same as the CSV parser.
@kennytm kennytm removed the Should Cherry-pick This PR should be cherry-picked back the previous release train label Jul 20, 2019
kennytm added a commit that referenced this pull request Jul 21, 2019
Move the ToLower operation from (*TableRestore).initializeColumns() to
(*ChunkParser).ReadRow(). In fact this is the same as the CSV parser.
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) type/enhancement Performance improvement or refactoring type/test Changes test cases only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants