{"record":{"id":"d2c08d70ed11f388","repo":"vitessio/vitess","slug":"unsupported-qualifier-for-expression","errorCode":null,"errorMessage":"unsupported qualifier for '*' expression","messagePattern":"unsupported qualifier for '\\*' expression","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go","lineNumber":245,"sourceCode":"\tcase filter == ExcludeStr:\n\t\treturn nil, nil\n\t}\n\tsel, fromTable, err := analyzeSelectFrom(query, parser)\n\tif err != nil {\n\t\treturn nil, planError(err, query)\n\t}\n\tsendRule := &binlogdatapb.Rule{\n\t\tMatch: fromTable,\n\t}\n\n\tif expr, ok := sel.SelectExprs.Exprs[0].(*sqlparser.StarExpr); ok {\n\t\t// If it's a \"select *\", we return a partial plan, and complete\n\t\t// it when we get back field info from the stream.\n\t\tif len(sel.SelectExprs.Exprs) != 1 {\n\t\t\treturn nil, planError(errors.New(\"unsupported mix of '*' and columns\"), sqlparser.String(sel))\n\t\t}\n\t\tif !expr.TableName.IsEmpty() {\n\t\t\treturn nil, planError(errors.New(\"unsupported qualifier for '*' expression\"), sqlparser.String(expr))\n\t\t}\n\t\tsendRule.Filter = query\n\t\ttablePlan := &TablePlan{\n\t\t\tTargetName:       tableName,\n\t\t\tSendRule:         sendRule,\n\t\t\tLastpk:           lastpk,\n\t\t\tStats:            stats,\n\t\t\tConvertCharset:   rule.ConvertCharset,\n\t\t\tConvertIntToEnum: rule.ConvertIntToEnum,\n\t\t\tCollationEnv:     collationEnv,\n\t\t\tWorkflowConfig:   workflowConfig,\n\t\t}\n\n\t\treturn tablePlan, nil\n\t}\n\n\ttpb := &tablePlanBuilder{\n\t\tname: sqlparser.NewIdentifierCS(tableName),","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go#L227-L263","documentation":"buildTablePlan rejects a StarExpr that carries a table qualifier (e.g. 'select t.* from t'). Only an unqualified '*' is supported in vreplication filter rules, since the plan builder maps the wildcard onto the single target table.","triggerScenarios":"A vreplication filter rule whose query uses qualified wildcards like 'select t.* from t' or 'select db.t.* from t'.","commonSituations":"Filter rules copied from application SQL that used qualified stars; multi-table queries adapted to a single-table rule.","solutions":["Replace 't.*' with bare '*' in the filter rule","Or list the columns explicitly: 'select col1, col2 from t'","Re-create the stream with the corrected filter rule"],"exampleFix":"// before\n\"filter\": \"select t.* from t\"\n// after\n\"filter\": \"select * from t\"","handlingStrategy":"validation","validationCode":"stmt, _ := parser.Parse(filterQuery)\nsel := stmt.(*sqlparser.Select)\ne0 := sel.SelectExprs.Exprs[0]\nif star, ok := e0.(*sqlparser.StarExpr); ok && !star.TableName.IsEmpty() {\n    return errors.New(\"qualified '*' not allowed in filter rule\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never use 't.*' in vreplication filter rules","Normalize filter SQL to bare '*' before applying","Test filter rules against a local vttablet before production runs"],"tags":["vreplication","filter","sql-parsing"],"backgroundTag":"invalid-filter-rule","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}