parser: add explain format for optimizer trace#684
Conversation
edfc884 to
14df345
Compare
Codecov Report
@@ Coverage Diff @@
## master #684 +/- ##
==========================================
+ Coverage 79.82% 79.82% +<.01%
==========================================
Files 37 37
Lines 13625 13635 +10
==========================================
+ Hits 10876 10884 +8
- Misses 2103 2105 +2
Partials 646 646
Continue to review full report at Codecov.
|
| "OPTIMIZE": optimize, | ||
| "OPTION": option, | ||
| "OPTIONALLY": optionally, | ||
| "OPT_TRACE": opttrace, |
There was a problem hiding this comment.
Seems that we don't need it? Check https://github.com/pingcap/parser/pull/654/files
6957be4 to
a166fb1
Compare
| ExplainFormatROW = "row" | ||
| ExplainFormatDOT = "dot" | ||
| ExplainFormatHint = "hint" | ||
| ExplainFormatTrace = "opt_trace" |
| Format: "row", | ||
| } | ||
| startOffset := parser.startOffset(&yyS[yypt]) | ||
| $2.SetText(string(parser.src[startOffset:])) |
There was a problem hiding this comment.
Could you give an example to explain the purpose of these 2 lines?
| startOffset := parser.startOffset(&yyS[yypt]) | ||
| $5.SetText(string(parser.src[startOffset:])) | ||
| } | ||
| | ExplainSym "FORMAT" "=" ExplainFormatType "FOR" "CONNECTION" NUM |
There was a problem hiding this comment.
We cannot get the optimizer trace from explain for connection since the plan may have already been generated?
|
@winoros: PR needs rebase. DetailsInstructions 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 kubernetes/test-infra repository. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #684 +/- ##
=======================================
Coverage 79.82% 79.82%
=======================================
Files 37 37
Lines 13625 13635 +10
=======================================
+ Hits 10876 10884 +8
- Misses 2103 2105 +2
Partials 646 646 |
What problem does this PR solve?
Add one more new explain format to enable optimizer trace.
Check List
Tests