{"record":{"id":"d3ad865f41ba35c9","repo":"temporalio/temporal","slug":"invalid-filter-s","errorCode":null,"errorMessage":"invalid filter: %s","messagePattern":"invalid filter: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/history/workflow/matcher/evaluator.go","lineNumber":44,"sourceCode":"\t\treturn nil, NewMatcherError(\"%s: 'limit' clause\", notSupportedErrMessage)\n\t}\n\n\tif selectStmt.Where == nil {\n\t\treturn nil, NewMatcherError(\"%s: 'where' clause is missing\", notSupportedErrMessage)\n\t}\n\n\treturn selectStmt.Where.Expr, nil\n}\n\nfunc prepareQuery(query string) (string, error) {\n\tquery = strings.TrimSpace(query)\n\tif query == \"\" {\n\t\treturn \"\", nil\n\t}\n\n\tif strings.HasPrefix(strings.ToLower(query), \"where \") ||\n\t\tstrings.HasPrefix(strings.ToLower(query), \"select \") {\n\t\treturn \"\", fmt.Errorf(\"invalid filter: %s\", query)\n\t}\n\n\t// sqlparser can't parse just WHERE clause but instead accepts only valid SQL statement.\n\tquery = fmt.Sprintf(\"select * from table1 where %s\", query)\n\n\treturn query, nil\n}\n\nfunc compareQueryString(inStr string, expectedStr string, operation string, fieldName string) (bool, error) {\n\tif len(inStr) == 0 {\n\t\treturn false, NewMatcherError(\"%s cannot be empty\", fieldName)\n\t}\n\tswitch operation {\n\tcase sqlparser.EqualStr:\n\t\treturn expectedStr == inStr, nil\n\tcase sqlparser.NotEqualStr:\n\t\treturn expectedStr != inStr, nil\n\tcase sqlparser.StartsWithStr:","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/service/history/workflow/matcher/evaluator.go#L26-L62","documentation":"Error \"invalid filter: %s\" thrown in temporalio/temporal.","triggerScenarios":"Thrown at service/history/workflow/matcher/evaluator.go:44 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}