{"record":{"id":"8b1ad6049bb2d8f7","repo":"risingwavelabs/risingwave","slug":"expr-error-0-8b1ad6","errorCode":null,"errorMessage":"Expr error: {0}","messagePattern":"Expr error: (.+?)","errorType":"error_code","errorClass":"ErrorCode::ExprError","httpStatus":null,"severity":"error","filePath":"src/frontend/src/error.rs","lineNumber":73,"sourceCode":"        #[backtrace]\n        BoxedError,\n    ),\n    #[error(transparent)]\n    NotImplemented(#[from] NotImplemented),\n    // Tips: Use this only if it's intended to reject the query\n    #[error(\"Not supported: {0}\\nHINT: {1}\")]\n    NotSupported(String, String),\n    #[error(transparent)]\n    NoFunction(#[from] NoFunction),\n    #[error(transparent)]\n    IoError(#[from] std::io::Error),\n    #[error(\"Storage error: {0}\")]\n    StorageError(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"Expr error: {0}\")]\n    ExprError(\n        #[source]\n        #[backtrace]\n        BoxedError,\n    ),\n    // TODO(error-handling): there's a limitation that `#[transparent]` can't be used with `#[backtrace]` if no `#[from]`\n    // So we emulate a transparent error with \"{0}\" display here.\n    #[error(\"{0}\")]\n    BatchError(\n        #[source]\n        #[backtrace]\n        // `BatchError`\n        BoxedError,\n    ),\n    #[error(\"Array error: {0}\")]\n    ArrayError(\n        #[from]\n        #[backtrace]","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/error.rs#L55-L91","documentation":"`ErrorCode::ExprError` wraps a type-erased `BoxedError` from the expression evaluation framework. It indicates an expression could not be built or evaluated — typically type/argument problems in scalar functions — with the underlying cause chained as `#[source]`.","triggerScenarios":"Planning or executing expressions: a function called with unsupported argument types, constant-folding failure, or a projection/agg expression that fails signature resolution.","commonSituations":"Calling a UDF/builtin with wrong-typed columns, NULL-handling mismatches, using an expression in a context (index, filter on MV) where its type isn't supported.","solutions":["Read the chained source error for the exact expression failure","Check operand types and add explicit casts (e.g. `::varchar`, `::int`)","Verify the function exists and supports these argument types in this RisingWave version","Simplify the expression to isolate the failing sub-expression"],"exampleFix":"-- before\nSELECT my_udf(int_col) FROM t; -- ExprError: expects varchar\n-- after\nSELECT my_udf(int_col::varchar) FROM t;","handlingStrategy":"validation","validationCode":"-- pre-check operand types\nSELECT pg_typeof(int_col), pg_typeof('x') FROM t LIMIT 1;","typeGuard":"fn is_expr_error(e: &RwError) -> bool { matches!(e.get_code(), ErrorCode::ExprError(_)) }","tryCatchPattern":"match err.get_code() { ErrorCode::ExprError(inner) => log_expr_failure(inner), _ => propagate }","preventionTips":["Cast operands explicitly instead of relying on implicit coercion","Check function signatures in docs before use","Test complex expressions on sample data first","Avoid nesting deeply-typed expressions without intermediate casts"],"tags":["expression","sql","type-mismatch"],"backgroundTag":"type-mismatch","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}