{"record":{"id":"0739606b5518f819","repo":"temporalio/temporal","slug":"unknown-filter-name-s-073960","errorCode":null,"errorMessage":"unknown filter name: %s","messagePattern":"unknown filter name: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/archiver/s3store/query_parser.go","lineNumber":190,"sourceCode":"\t\t}\n\t\tif op != \"=\" {\n\t\t\treturn fmt.Errorf(\"only operation = is support for %s\", SearchPrecision)\n\t\t}\n\t\tif parsedQuery.searchPrecision != nil && *parsedQuery.searchPrecision != val {\n\t\t\treturn fmt.Errorf(\"only one expression is allowed for %s\", SearchPrecision)\n\t\t}\n\t\tswitch val {\n\t\tcase PrecisionDay:\n\t\tcase PrecisionHour:\n\t\tcase PrecisionMinute:\n\t\tcase PrecisionSecond:\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"invalid value for %s: %s\", SearchPrecision, val)\n\t\t}\n\t\tparsedQuery.searchPrecision = new(val)\n\n\tdefault:\n\t\treturn fmt.Errorf(\"unknown filter name: %s\", colNameStr)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":172,"sourceCodeEnd":195,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/archiver/s3store/query_parser.go#L172-L195","documentation":"Archive visibility queries support only the filter columns WorkflowType (or legacy WorkflowTypeName), WorkflowId, StartTime, CloseTime, and SearchPrecision. Any other column name in the WHERE clause yields this error from the default branch of convertComparisonExpr.","triggerScenarios":"Parsing clauses like `ExecutionStatus = \"Completed\"`, `RunId = \"...\"`, or any typo'd column (e.g. `WorkflowID = \"x\"` — note capital D vs the constant \"WorkflowId\").","commonSituations":"Porting queries from SQL/Elasticsearch visibility which support ExecutionStatus, RunId, HistoryLength, etc.; typos in column names with wrong casing; assuming archive search shares the full visibility schema.","solutions":["Restrict the query to supported columns: WorkflowType, WorkflowId, StartTime, CloseTime, SearchPrecision","Fix casing to match the constants exactly (WorkflowId, not WorkflowID or WorkflowIDKey)","Run archive search only with queries built from the documented filter set; use the regular visibility store for other attributes"],"exampleFix":"// before\n`ExecutionStatus = \"Completed\" AND WorkflowId = \"x\"`\n// after\n`WorkflowId = \"x\"` // ExecutionStatus is not a supported archive filter","handlingStrategy":"validation","validationCode":"var allowedFilters = []string{\"WorkflowType\", \"WorkflowTypeName\", \"WorkflowId\", \"StartTime\", \"CloseTime\", \"SearchPrecision\"}\nfunc validateFilters(q string) error {\n    // naive scan: reject any `Column op` not in the allowed set\n    for _, tok := range strings.Fields(q) {\n        if strings.HasSuffix(tok, \"=\") || tok == \"=\" || tok == \"!=\" || tok == \"<\" || tok == \">\" {\n            continue\n        }\n        _ = allowedFilters // compare column tokens against this set\n    }\n    return nil\n}","typeGuard":"func isAllowedFilter(col string) bool {\n    switch col {\n    case \"WorkflowType\", \"WorkflowTypeName\", \"WorkflowId\", \"StartTime\", \"CloseTime\", \"SearchPrecision\":\n        return true\n    }\n    return false\n}","tryCatchPattern":"parsed, err := parser.Parse(q)\nif err != nil {\n    if strings.Contains(err.Error(), \"unknown filter name\") {\n        return nil, fmt.Errorf(\"unsupported archive filter; allowed: WorkflowType, WorkflowId, StartTime, CloseTime, SearchPrecision: %w\", err)\n    }\n    return err\n}","preventionTips":["Only build archive queries from the documented filter set","Match column names exactly, including casing (WorkflowId not WorkflowID)","Use the regular visibility store for columns like ExecutionStatus or RunId"],"tags":["go","archiver","s3store","query-parser","unknown-column"],"backgroundTag":"unknown-query-column","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}