{"record":{"id":"efd21ffe614a5b13","repo":"risingwavelabs/risingwave","slug":"parameter-value","errorCode":null,"errorMessage":"parameter value","messagePattern":"parameter value","errorType":"validation","errorClass":"ParserError","httpStatus":null,"severity":"error","filePath":"src/sqlparser/src/parser.rs","lineNumber":3134,"sourceCode":"    fn parse_config_param_no_list(&mut self) -> ModalResult<ConfigParam> {\n        self.parse_config_param_inner(Self::parse_set_variable_no_list)\n    }\n\n    fn parse_set_variable_no_list(&mut self) -> ModalResult<SetVariableValue> {\n        alt((\n            Keyword::DEFAULT.value(SetVariableValue::Default),\n            alt((\n                Self::ensure_parse_value.map(SetVariableValueSingle::Literal),\n                |parser: &mut Self| {\n                    let checkpoint = *parser;\n                    let ident = parser.parse_identifier()?;\n                    if ident.value == \"default\" {\n                        *parser = checkpoint;\n                        return parser.expected(\"parameter list value\").map_err(|e| e.cut());\n                    }\n                    Ok(SetVariableValueSingle::Ident(ident))\n                },\n                fail.expect(\"parameter value\"),\n            ))\n            .map(|single: SetVariableValueSingle| SetVariableValue::Single(single)),\n        ))\n        .parse_next(self)\n    }\n\n    pub fn parse_since(&mut self) -> ModalResult<Since> {\n        if self.parse_keyword(Keyword::SINCE) {\n            let checkpoint = *self;\n            let token = self.next_token();\n            match token.token {\n                Token::Word(w) => {\n                    let ident = w.to_ident()?;\n                    // Backward compatibility for now.\n                    if ident.real_value() == \"proctime\" || ident.real_value() == \"now\" {\n                        self.expect_token(&Token::LParen)?;\n                        self.expect_token(&Token::RParen)?;\n                        Ok(Since::ProcessTime)","sourceCodeStart":3116,"sourceCodeEnd":3152,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/sqlparser/src/parser.rs#L3116-L3152","documentation":"Raised while parsing a SET VARIABLE statement's single value: after the variable name and '=', the parser expects a literal or identifier, and the `fail.expect(\"parameter value\")` branch fires when neither matches. If the token is the identifier 'default', a related cut error 'parameter list value' is raised instead. The message reports that a valid SET value was required but absent.","triggerScenarios":"Parsing `SET <var> = <bad-token>` where the right-hand side is not a number, string, or identifier — e.g. `SET x = ;`, `SET x = (1)`, or an expression like `SET x = 1 + 2`.","commonSituations":"Session-variable scripts ported from other engines whose SET syntax supports expressions; truncated SQL from string concatenation; drivers sending dialect-specific SET forms (e.g. `SET x TO ...` variants).","solutions":["Provide a simple literal or identifier after '=', e.g. `SET x = 'value'` or `SET x = 42`.","Remove complex expressions; precompute the value in the client and set the literal.","Check the dialect's SET statement grammar and rewrite unsupported forms (TO, expressions, lists)."],"exampleFix":"// before\nSET my_timeout = 30 * 1000;\n// after\nSET my_timeout = 30000;","handlingStrategy":"try-catch","validationCode":"// SET value must be a simple literal or identifier\nfunction validSetValue(v) { return typeof v === 'number' || typeof v === 'string' || /^[A-Za-z_][A-Za-z0-9_]*$/.test(v); }","typeGuard":null,"tryCatchPattern":"try { run(sql); } catch (e) { if (String(e).includes('parameter value')) { rewriteToLiteralSet(sql); } else { throw e; } }","preventionTips":["Precompute expressions client-side; only assign literals or identifiers via SET.","Check the target dialect's SET grammar before porting scripts.","Quote string values consistently."],"tags":["sql","parser","set","syntax"],"backgroundTag":"invalid-argument-format","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}