ddl: don't rely on expression.Column.ColName#11255
Merged
winoros merged 4 commits intoJul 23, 2019
Merged
Conversation
6e41a73 to
15a379b
Compare
Codecov Report
@@ Coverage Diff @@
## master #11255 +/- ##
================================================
- Coverage 81.2684% 81.2643% -0.0041%
================================================
Files 423 423
Lines 90094 90117 +23
================================================
+ Hits 73218 73233 +15
- Misses 11581 11586 +5
- Partials 5295 5298 +3 |
Codecov Report
@@ Coverage Diff @@
## master #11255 +/- ##
=======================================
Coverage 81.33% 81.33%
=======================================
Files 423 423
Lines 90750 90750
=======================================
Hits 73807 73807
Misses 11632 11632
Partials 5311 5311 |
alivxxx
reviewed
Jul 17, 2019
|
|
||
| func extractPartitionColumns(partExpr string, tblInfo *model.TableInfo) ([]*model.ColumnInfo, error) { | ||
| partExpr = "select " + partExpr | ||
| stmts, _, err := parser.New().Parse(partExpr, "", "") |
Contributor
There was a problem hiding this comment.
Should we handle warnings like ParseSimpleExprWithTableInfo?
Member
Author
There was a problem hiding this comment.
I think we don't need. The warning generated before is not handled either.
qw4990
reviewed
Jul 18, 2019
Contributor
|
LGTM |
tiancaiamao
approved these changes
Jul 19, 2019
ngaut
reviewed
Jul 19, 2019
| } | ||
| extractor := &columnNameExtractor{ | ||
| tblInfo: tblInfo, | ||
| extractedColumns: make([]*model.ColumnInfo, 0), |
Member
There was a problem hiding this comment.
You can keep extractedColumns as nil
Contributor
|
/run-all-tests |
sre-bot
pushed a commit
that referenced
this pull request
Aug 30, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Clean the dependencies of
expression.Column.What is changed and how it works?
Directly extract the columns. Don't build expression and use
expression.Column.ColName.Check List
Tests