{"record":{"id":"8e6c8c7e73f78fa4","repo":"risingwavelabs/risingwave","slug":"logicalvectorsearchlookupjoin-does-not-support-inp","errorCode":null,"errorMessage":"LogicalVectorSearchLookupJoin does not support input that can possibly be rewritten","messagePattern":"LogicalVectorSearchLookupJoin does not support input that can possibly be rewritten","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/optimizer/plan_node/logical_vector_search_lookup_join.rs","lineNumber":291,"sourceCode":"        let core = self.core.clone_with_input(input, lookup);\n        LogicalFilter::create(Self::with_core(core).into(), predicate)\n    }\n}\n\nimpl ToStream for LogicalVectorSearchLookupJoin {\n    fn logical_rewrite_for_stream(\n        &self,\n        ctx: &mut RewriteStreamContext,\n    ) -> crate::error::Result<(PlanRef, ColIndexMapping)> {\n        if !self\n            .core\n            .input\n            .logical_rewrite_for_stream(ctx)?\n            .1\n            .is_identity()\n        {\n            // TODO: support it\n            bail!(\n                \"LogicalVectorSearchLookupJoin does not support input that can possibly be rewritten\"\n            )\n        }\n        Ok((\n            self.clone().into(),\n            ColIndexMapping::identity(self.base.schema().len()),\n        ))\n    }\n\n    fn to_stream(&self, ctx: &mut ToStreamContext) -> Result<StreamPlanRef> {\n        if let Some(core) = self.to_vector_index_lookup_join(|plan| plan.to_stream(ctx))? {\n            // `ProcessTimeBroadcast` is intentionally excluded: the vector-index lookup executor\n            // does not consume a broadcast change stream or maintain replicated lookup state.\n            if !matches!(&core.as_of, Some(AsOf::ProcessTime)) {\n                bail!(\"streaming vector index lookup join must be proctime temporal join\");\n            }\n            return Ok(StreamVectorIndexLookupJoin::new(core)?.into());\n        }","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/optimizer/plan_node/logical_vector_search_lookup_join.rs#L273-L309","documentation":"Raised in LogicalVectorSearchLookupJoin::logical_rewrite_for_stream when the input's stream rewrite is not identity (the input would be rewritten, e.g. introducing shares or length changes). The lookup-join executor requires a stable, unrewritten input, so streaming conversion is rejected with a TODO to support it.","triggerScenarios":"Thrown at src/frontend/src/optimizer/plan_node/logical_vector_search_lookup_join.rs:291 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restructure the streaming query so the lookup join's input does not require logical stream rewriting (no shared subplans/rewrites).","Alternatively extend the optimizer to support rewritten inputs for vector search lookup joins."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}