vitessio/vitess · error
VT09015
VT09015
Error message
VT09015: This query cannot be planned without more information on the SQL schema. Please turn on schema tracking or add authoritative columns information to your VSchema.
What it means
VT09015 is thrown by StarProjections.GetColumns() when something asks a `SELECT *` projection to enumerate its columns. Expanding `*` into concrete columns requires schema knowledge; without schema tracking or authoritative column info in the VSchema, the planner cannot list the columns and fails.
Source
Thrown at go/vt/vtgate/planbuilder/operators/projection.go:136
}
func newProjExprWithInner(ae *sqlparser.AliasedExpr, in sqlparser.Expr) *ProjExpr {
return &ProjExpr{
Original: ae,
EvalExpr: in,
ColExpr: ae.Expr,
}
}
func newAliasedProjection(src Operator) *Projection {
return &Projection{
unaryOperator: newUnaryOp(src),
Columns: AliasedProjections{},
}
}
func (sp StarProjections) GetColumns() []*sqlparser.AliasedExpr {
panic(vterrors.VT09015())
}
func (sp StarProjections) GetSelectExprs() []sqlparser.SelectExpr {
return sp
}
func (ap AliasedProjections) GetColumns() []*sqlparser.AliasedExpr {
return slice.Map(ap, func(from *ProjExpr) *sqlparser.AliasedExpr {
return from.Original
})
}
func (ap AliasedProjections) GetSelectExprs() []sqlparser.SelectExpr {
return slice.Map(ap, func(from *ProjExpr) sqlparser.SelectExpr {
return aeWrap(from.ColExpr)
})
}
View on GitHub (pinned to 01a25a7d17)
Solutions
- Enable schema tracking so vtgate learns columns from vttablets.
- Add explicit `"columns": [...]` (and `column_list_authoritative` where valid) to the table in the VSchema.
- Replace `SELECT *` with an explicit column list in the query.
Example fix
// before SELECT * FROM users; // after SELECT id, name, email FROM users;
Defensive patterns
Strategy: validation
Validate before calling
// Check the table exposes authoritative columns before SELECT *
tbl := vschema.Table(keyspace, name)
if tbl == nil || len(tbl.GetColumns()) == 0 {
return errors.New("cannot run SELECT * without schema tracking or authoritative columns")
} Try / catch
if strings.Contains(err.Error(), "VT09015") { // enable schema tracking / add vschema columns, then retry plan } Prevention
- Avoid SELECT * in sharded Vitess queries
- Keep VSchema column lists up to date with DDL changes
- Enable schema tracking so column info is discovered automatically
When it happens
Trigger: Calling GetColumns() on a StarProjections (from `SELECT *` / `t.*`) while planning, when the vschema lacks authoritative columns and schema tracking is off.
Common situations: Queries using `SELECT *` or table-qualified `*` against tables whose VSchema has no `columns` definition, with vtgate schema tracking disabled (common in older deployments or when `--schema_change_signal` is off).
Related errors
- VT09015
- cell mode should be handled by the gateway, not the balancer
- both the dry-run mode and actual buffering is enabled. To av
- unix sockets are not supported on windows
- Binary.ReverseMap: keyspaceId is nil
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/3dc2d9b9aa05d48d.
Report an issue: GitHub.