-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
planner: add binding and recursive test for Merge
hint
#36352
Conversation
I want to insert a hint for CTE-inline, but the Optimizer doesn't find the hint which I code.
only insert some var
I fix my mistake , and remake the hintparser.y
comment on exported type CTEHintInfo should be of the form "CTEHintInfo ..." (with optional leading
fix merge conflict.
try to add a unit test
add cte-hint test(part of them), the cteinlinehint in different cte is coding.
when meet cteinlinehint, open the inline function
support CTEInlineHint in different cte query.
add some parer unit test, ref: TestCTE
make parser
change the hint for CTE name. Old name: CTEInline , New name: Merge. Because we need align with MySQL
test when with recursive,the hint merge is not start
planner/core/logical_plan_builder.go
Outdated
@@ -3631,6 +3631,11 @@ func (b *PlanBuilder) pushTableHints(hints []*ast.TableOptimizerHint, currentLev | |||
limitHints.preferLimitToCop = true | |||
case HintMerge: | |||
MergeHints.preferMerge = true | |||
if hint.Tables != nil { | |||
b.ctx.GetSessionVars().StmtCtx.AppendWarning(ErrInternal.GenWithStack("The MERGE hint is not used correctly, maybe it inputs a table name.")) | |||
MergeHints.preferMerge = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can put MergeHints.preferMerge = true
after L3638, and remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@father1111: In response to this:
Instructions 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 ti-community-infra/tichi repository. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 57657c5
|
/run-unit-test |
1 similar comment
/run-unit-test |
TiDB MergeCI notify🔴 Bad News! [2] CI still failing after this pr merged.
|
What problem does this PR solve?
Issue Number: close #17472
Problem Summary: add binding and recursive test for
Merge
hint(#34574 ), and fix some unit test and function.What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.