Skip to content
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: support the view hint #38653

Merged
merged 22 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
67b20ce
planner: support parser part for the view hint
Reminiscent Oct 20, 2022
fee847f
planner: support planner part for the view hint
Reminiscent Oct 20, 2022
ea233a3
add a test case
Reminiscent Oct 20, 2022
a4f53ab
add more test cases
Reminiscent Oct 26, 2022
2c4555d
resolve conflicts
Reminiscent Oct 26, 2022
5c52844
add test cases for view hint scope
Reminiscent Nov 4, 2022
6312048
Merge branch 'master' of https://github.com/pingcap/tidb into view-hint1
Reminiscent Nov 4, 2022
df8fb18
Merge branch 'master' into view-hint1
qw4990 Nov 7, 2022
8939624
fix build
Reminiscent Nov 8, 2022
7c9b574
fix ut
Reminiscent Nov 8, 2022
9b519ca
Merge branch 'master' of https://github.com/pingcap/tidb into view-hint1
Reminiscent Nov 8, 2022
a4cf4ba
Merge remote-tracking branch 'origin/view-hint1' into view-hint1
Reminiscent Nov 8, 2022
3440def
remove all of the todo parts
Reminiscent Nov 8, 2022
9ea2e45
Merge branch 'master' of https://github.com/pingcap/tidb into view-hint1
Reminiscent Nov 8, 2022
c8567df
Merge branch 'master' into view-hint1
AilinKid Nov 10, 2022
ed82a4e
Merge branch 'master' into view-hint1
fzzf678 Nov 10, 2022
3b12fad
address comments
Reminiscent Nov 11, 2022
5cc8c9a
Merge branch 'master' of https://github.com/pingcap/tidb into view-hint1
Reminiscent Nov 11, 2022
4ef74cd
Merge remote-tracking branch 'origin/view-hint1' into view-hint1
Reminiscent Nov 11, 2022
cc09a5d
Merge branch 'master' into view-hint1
fzzf678 Nov 14, 2022
8cd8bd0
Merge branch 'master' into view-hint1
ti-chi-bot Nov 14, 2022
b349fdb
Merge branch 'master' into view-hint1
ti-chi-bot Nov 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion executor/infoschema_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ func (e *hugeMemTableRetriever) dataForColumnsInTable(ctx context.Context, sctx
if err := runWithSystemSession(internalCtx, sctx, func(s sessionctx.Context) error {
planBuilder, _ := plannercore.NewPlanBuilder().Init(s, is, &hint.BlockHintProcessor{})
var err error
viewLogicalPlan, err = planBuilder.BuildDataSourceFromView(ctx, schema.Name, tbl)
viewLogicalPlan, err = planBuilder.BuildDataSourceFromView(ctx, schema.Name, tbl, nil, nil)
return errors.Trace(err)
}); err != nil {
sctx.GetSessionVars().StmtCtx.AppendWarning(err)
Expand Down
2 changes: 1 addition & 1 deletion executor/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,7 @@ func tryFillViewColumnType(ctx context.Context, sctx sessionctx.Context, is info
// Retrieve view columns info.
planBuilder, _ := plannercore.NewPlanBuilder(
plannercore.PlanBuilderOptNoExecution{}).Init(s, is, &hint.BlockHintProcessor{})
if viewLogicalPlan, err := planBuilder.BuildDataSourceFromView(ctx, dbName, tbl); err == nil {
if viewLogicalPlan, err := planBuilder.BuildDataSourceFromView(ctx, dbName, tbl, nil, nil); err == nil {
viewSchema := viewLogicalPlan.Schema()
viewOutputNames := viewLogicalPlan.OutputNames()
for _, col := range tbl.Columns {
Expand Down
Loading