{"record":{"id":"75bb347aae5c7e61","repo":"risingwavelabs/risingwave","slug":"logicalvectorsearchlookupjoin-should-use-proper-ve","errorCode":null,"errorMessage":"LogicalVectorSearchLookupJoin should use proper vector index in streaming job","messagePattern":"LogicalVectorSearchLookupJoin should use proper vector index in streaming job","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/optimizer/plan_node/logical_vector_search_lookup_join.rs","lineNumber":310,"sourceCode":"                \"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        }\n        bail!(\"LogicalVectorSearchLookupJoin should use proper vector index in streaming job\")\n    }\n}\n\nimpl LogicalVectorSearchLookupJoin {\n    pub(crate) fn as_index_lookup(&self) -> Option<(&Arc<VectorIndex>, Vec<usize>, Option<AsOf>)> {\n        if let Some(scan) = self.core.lookup.as_logical_scan()\n            && let Some((\n                index,\n                _covered_table_cols_idx,\n                non_covered_table_cols_idx,\n                primary_table_col_in_output,\n            )) = LogicalVectorSearch::resolve_vector_index_lookup(\n                scan,\n                &self.core.lookup_vector,\n                self.core.distance_type,\n                &self.core.lookup_output_indices,\n            )\n            && non_covered_table_cols_idx.is_empty()","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/optimizer/plan_node/logical_vector_search_lookup_join.rs#L292-L328","documentation":"Raised in LogicalVectorSearchLookupJoin::to_stream when no suitable vector index could be resolved for the streaming lookup. The executor requires a matching vector index on the lookup table (correct column types/distance function); without one the streaming plan cannot be built.","triggerScenarios":"Thrown at src/frontend/src/optimizer/plan_node/logical_vector_search_lookup_join.rs:310 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create a vector index on the table before running a streaming vector index lookup join, and ensure the query matches the index definition.","Verify the vector column and distance type match an existing index."],"exampleFix":null,"handlingStrategy":"validation","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"}