{"record":{"id":"3dc2d9b9aa05d48d","repo":"vitessio/vitess","slug":"vt09015-3dc2d9","errorCode":"VT09015","errorMessage":"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.","messagePattern":"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\\.","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtgate/planbuilder/operators/projection.go","lineNumber":136,"sourceCode":"}\n\nfunc newProjExprWithInner(ae *sqlparser.AliasedExpr, in sqlparser.Expr) *ProjExpr {\n\treturn &ProjExpr{\n\t\tOriginal: ae,\n\t\tEvalExpr: in,\n\t\tColExpr:  ae.Expr,\n\t}\n}\n\nfunc newAliasedProjection(src Operator) *Projection {\n\treturn &Projection{\n\t\tunaryOperator: newUnaryOp(src),\n\t\tColumns:       AliasedProjections{},\n\t}\n}\n\nfunc (sp StarProjections) GetColumns() []*sqlparser.AliasedExpr {\n\tpanic(vterrors.VT09015())\n}\n\nfunc (sp StarProjections) GetSelectExprs() []sqlparser.SelectExpr {\n\treturn sp\n}\n\nfunc (ap AliasedProjections) GetColumns() []*sqlparser.AliasedExpr {\n\treturn slice.Map(ap, func(from *ProjExpr) *sqlparser.AliasedExpr {\n\t\treturn from.Original\n\t})\n}\n\nfunc (ap AliasedProjections) GetSelectExprs() []sqlparser.SelectExpr {\n\treturn slice.Map(ap, func(from *ProjExpr) sqlparser.SelectExpr {\n\t\treturn aeWrap(from.ColExpr)\n\t})\n}\n","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtgate/planbuilder/operators/projection.go#L118-L154","documentation":"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.","triggerScenarios":"Calling GetColumns() on a StarProjections (from `SELECT *` / `t.*`) while planning, when the vschema lacks authoritative columns and schema tracking is off.","commonSituations":"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).","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."],"exampleFix":"// before\nSELECT * FROM users;\n// after\nSELECT id, name, email FROM users;","handlingStrategy":"validation","validationCode":"// Check the table exposes authoritative columns before SELECT *\ntbl := vschema.Table(keyspace, name)\nif tbl == nil || len(tbl.GetColumns()) == 0 {\n    return errors.New(\"cannot run SELECT * without schema tracking or authoritative columns\")\n}","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"VT09015\") { // enable schema tracking / add vschema columns, then retry plan }","preventionTips":["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"],"tags":["vtgate","planning","select-star","schema-tracking"],"backgroundTag":"schema-tracking-required","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}