Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
Signed-off-by: AilinKid <314806019@qq.com>
  • Loading branch information
AilinKid committed Dec 13, 2023
1 parent c4945d4 commit 3ecc8bf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions pkg/planner/core/logical_plan_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ func (b *PlanBuilder) buildIntersect(ctx context.Context, selects []ast.Node) (L
// TODO: support intersect all
return nil, nil, errors.Errorf("TiDB do not support intersect all")
}
rightPlan, err = b.buildSetOpr(ctx, &ast.SetOprStmt{SelectList: x, With: x.With})
rightPlan, err = b.buildSetOpr(ctx, &ast.SetOprStmt{SelectList: x, With: x.With, Limit: x.Limit, OrderBy: x.OrderBy})
}
if err != nil {
return nil, nil, err
Expand Down Expand Up @@ -4317,9 +4317,6 @@ func (b *PlanBuilder) buildSelect(ctx context.Context, sel *ast.SelectStmt) (p L
// table hints are only visible in the current SELECT statement.
b.popTableHints()
}()
if strings.HasPrefix(b.ctx.GetSessionVars().StmtCtx.OriginalSQL, "select 1,1,1 union all ( select * from employee where dept_id = 1") {
fmt.Println(1)
}
if b.buildingRecursivePartForCTE {
if sel.Distinct || sel.OrderBy != nil || sel.Limit != nil {
return nil, ErrNotSupportedYet.GenWithStackByArgs("ORDER BY / LIMIT / SELECT DISTINCT in recursive query block of Common Table Expression")
Expand Down
2 changes: 0 additions & 2 deletions tests/integrationtest/t/executor/executor.test
Original file line number Diff line number Diff line change
Expand Up @@ -1755,8 +1755,6 @@ explain format = 'brief' select * from t as t1 left join t as t2 on t1.c1 = t2.c
--sorted_result
select * from t as t1 left join t as t2 on t1.c1 = t2.c1 where t1.c1 is not NULL;

Test

# TestSetOperation
set tidb_cost_model_version=2;
drop table if exists t1, t2, t3;
Expand Down

0 comments on commit 3ecc8bf

Please sign in to comment.