{"record":{"id":"b6aea3a917a14e13","repo":"risingwavelabs/risingwave","slug":"unspecified-type-of-frameexclusion","errorCode":null,"errorMessage":"unspecified type of `FrameExclusion`","messagePattern":"unspecified type of `FrameExclusion`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/expr/core/src/window_function/call.rs","lineNumber":280,"sourceCode":"            UnboundedFollowing => UnboundedPreceding,\n        }\n    }\n}\n\n#[derive(Display, Debug, Copy, Clone, Eq, PartialEq, Hash, Default, EnumAsInner)]\n#[display(\"EXCLUDE {}\", style = \"TITLE CASE\")]\npub enum FrameExclusion {\n    CurrentRow,\n    // Group,\n    // Ties,\n    #[default]\n    NoOthers,\n}\n\nimpl FrameExclusion {\n    fn from_protobuf(exclusion: PbExclusion) -> Result<Self> {\n        let excl = match exclusion {\n            PbExclusion::Unspecified => bail!(\"unspecified type of `FrameExclusion`\"),\n            PbExclusion::CurrentRow => Self::CurrentRow,\n            PbExclusion::NoOthers => Self::NoOthers,\n        };\n        Ok(excl)\n    }\n\n    fn to_protobuf(self) -> PbExclusion {\n        match self {\n            Self::CurrentRow => PbExclusion::CurrentRow,\n            Self::NoOthers => PbExclusion::NoOthers,\n        }\n    }\n}\n","sourceCodeStart":262,"sourceCodeEnd":294,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/expr/core/src/window_function/call.rs#L262-L294","documentation":"When deserializing a FrameExclusion from its protobuf representation, an Unspecified exclusion type carries no information, so from_protobuf refuses to guess and returns an error instead of defaulting silently.","triggerScenarios":"A WindowFunction protobuf message arrives with frame exclusion set to PbExclusion::Unspecified, and WindowFuncCall::from_protobuf calls FrameExclusion::from_protobuf on it.","commonSituations":"A producer (frontend or an older/other RisingWave version) omitted the exclusion field in the protobuf, or a hand-crafted/mutated proto message lacking the exclusion variant.","solutions":["Set the frame exclusion explicitly (CurrentRow or NoOthers) when building the WindowFunction protobuf in the frontend.","Upgrade the frontend so it always fills the exclusion field before sending the plan.","Inspect the incoming protobuf plan for a missing/unset exclusion field."],"exampleFix":"// before (protobuf builder)\nframe.set_exclusion(PbExclusion::Unspecified);\n// after\nframe.set_exclusion(PbExclusion::NoOthers);","handlingStrategy":"validation","validationCode":"fn exclusion_is_set(e: PbExclusion) -> bool { !matches!(e, PbExclusion::Unspecified) }","typeGuard":"fn is_specified(e: &PbExclusion) -> bool { !matches!(e, PbExclusion::Unspecified) }","tryCatchPattern":"match FrameExclusion::from_protobuf(pb_exclusion) {\n    Ok(excl) => excl,\n    Err(e) => { log::warn!(\"frame exclusion unset, defaulting to NoOthers: {}\", e); FrameExclusion::NoOthers }\n}","preventionTips":["Always set the exclusion field explicitly when building WindowFunction protos.","Default to EXCLUDE NO OTHERS in the frontend binder.","Keep frontend and proto versions in sync."],"tags":["window-function","protobuf","enum","deserialization"],"backgroundTag":"invalid-enum-value","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"}