{"record":{"id":"56badd918597b643","repo":"vitessio/vitess","slug":"unsupported-qualifier-for-column-v-56badd","errorCode":null,"errorMessage":"unsupported qualifier for column: %v","messagePattern":"unsupported qualifier for column: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vttablet/tabletserver/vstreamer/planbuilder.go","lineNumber":650,"sourceCode":"func (plan *Plan) analyzeWhere(vschema *localVSchema, where *sqlparser.Where) error {\n\tif where == nil {\n\t\treturn nil\n\t}\n\t// Only a series of AND expressions are supported.\n\texprs := splitAndExpression(nil, where.Expr)\n\tfor _, expr := range exprs {\n\t\tswitch expr := expr.(type) {\n\t\tcase *sqlparser.ComparisonExpr:\n\t\t\topcode, err := getOpcode(expr)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tqualifiedName, ok := expr.Left.(*sqlparser.ColName)\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"unexpected: %v\", sqlparser.String(expr))\n\t\t\t}\n\t\t\tif !qualifiedName.Qualifier.IsEmpty() {\n\t\t\t\treturn fmt.Errorf(\"unsupported qualifier for column: %v\", sqlparser.String(qualifiedName))\n\t\t\t}\n\t\t\tcolnum, err := findColumn(plan.Table, qualifiedName.Name)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\t// The Right Expr is typically expected to be a Literal value,\n\t\t\t// except for the IN operator, where a Tuple value is expected.\n\t\t\t// Handle the IN operator case first.\n\t\t\tif opcode == In {\n\t\t\t\tvalues, ok := expr.Right.(sqlparser.ValTuple)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn fmt.Errorf(\"unexpected: %v\", sqlparser.String(expr))\n\t\t\t\t}\n\t\t\t\terr := plan.appendTupleFilter(values, opcode, colnum)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\t// Add it to the expressions that get pushed down to mysqld.","sourceCodeStart":632,"sourceCodeEnd":668,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vttablet/tabletserver/vstreamer/planbuilder.go#L632-L668","documentation":"When building a vstreamer table plan, WHERE-clause columns must be unqualified: the plan resolves the column against the single source table via findColumn, so a qualifier (table or alias prefix) is rejected with this error even though it would be valid SQL elsewhere.","triggerScenarios":"A VStream filter predicate uses a qualified column — e.g. t.col = 5 or ks.t.col = 'x' — while building the plan for a single table, triggering the 'unsupported qualifier' branch in analyzeWhere.","commonSituations":"Copy-pasted queries that qualify columns with the table alias; filters generated from larger queries where qualification was required; users referencing keyspace-qualified names in filter rules.","solutions":["Remove the table/alias qualifier from the column: col = value instead of t.col = value","Keep the filter tied to exactly one table so unqualified names are unambiguous","Re-test the filter after stripping qualifiers; findColumn matches bare names only"],"exampleFix":"// before\nwhere t.status = 'active'\n// after\nwhere status = 'active'","handlingStrategy":"validation","validationCode":"// strip/verify column qualifiers in filter predicates\nfor _, p := range predicates {\n    if cn, ok := p.left.(*sqlparser.ColName); ok && !cn.Qualifier.IsEmpty() {\n        return fmt.Errorf(\"remove qualifier from %v\", sqlparser.String(cn))\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use unqualified column names in VStream filters","One table per filter so unqualified names are unambiguous","Lint filter SQL for table-qualified columns before install"],"tags":["vstreamer","planbuilder","qualified-column","filter"],"backgroundTag":"unsupported-sql-feature","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}