diff --git a/go/vt/vtgate/planbuilder/operators/ast2op.go b/go/vt/vtgate/planbuilder/operators/ast2op.go index 5389333da43..39601bbd806 100644 --- a/go/vt/vtgate/planbuilder/operators/ast2op.go +++ b/go/vt/vtgate/planbuilder/operators/ast2op.go @@ -177,7 +177,7 @@ func createOperatorFromInsert(ctx *plancontext.PlanningContext, ins *sqlparser.I Distinct: true, SelectExprs: selExprs, From: []sqlparser.TableExpr{ - ins.Table, + sqlparser.NewAliasedTableExpr(fk.Table.GetTableName(), ""), }, Where: &sqlparser.Where{ Type: sqlparser.WhereClause,