{"record":{"id":"809142c30b7dd2e5","repo":"influxdata/influxdb","slug":"queryendpoint-query-is-not-implemented","errorCode":null,"errorMessage":"QueryEndpoint::query is not implemented","messagePattern":"QueryEndpoint::query is not implemented","errorType":"exception","errorClass":"QueryEndpointError","httpStatus":null,"severity":"error","filePath":"influxdb3_processing_engine/src/query.rs","lineNumber":69,"sourceCode":"        Ok(batches)\n    }\n}\n\n/// [`QueryEndpoint`] that is unimplemented.\n#[derive(Debug, Clone, Copy, Default)]\npub struct UnimplementedQueryEndpoint;\n\n#[async_trait]\nimpl QueryEndpoint for UnimplementedQueryEndpoint {\n    async fn query(\n        &self,\n        _db: &str,\n        query: &str,\n        _params: &HashMap<String, String>,\n    ) -> Result<Vec<RecordBatch>, QueryEndpointError> {\n        Err(QueryEndpointError::Fail {\n            query: query.to_owned(),\n            err: Box::new(std::io::Error::new(\n                std::io::ErrorKind::Unsupported,\n                \"QueryEndpoint::query is not implemented\",\n            )),\n        })\n    }\n}\n","sourceCodeStart":51,"sourceCodeEnd":76,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_processing_engine/src/query.rs#L51-L76","documentation":"`QueryEndpoint::query` in the processing engine is a stub that always returns `QueryEndpointError::Fail` wrapping an `io::ErrorKind::Unsupported` error. The processing-engine plugin runtime cannot execute SQL queries through this endpoint; any plugin calling `query()` on it will receive this failure.","triggerScenarios":"Any Python plugin invoking `query` on the `QueryEndpoint` provided to request/WAL plugins, regardless of the database, query text, or parameters.","commonSituations":"Plugin authors trying to query data inside a processing-engine trigger; following older plugin tutorials that assumed query support; the query path was never wired up in this build.","solutions":["Use the plugin's HTTP client to query the server's HTTP query API (e.g. POST /api/v3/query_sql) instead of `QueryEndpoint::query`.","Upgrade to a version/build where the query endpoint is implemented, if available.","Restructure the plugin to avoid inline queries — pass the needed data in trigger input instead."],"exampleFix":"// before\nlet batches = endpoint.query(\"mydb\", \"SELECT * FROM t\", &params)?;\n// after\nlet resp = http.post(\"http://localhost:8181/api/v3/query_sql\")\n    .body(\"db=mydb&q=SELECT%20*%20FROM%20t\").send()?;","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Python plugin\ntry:\n    batches = endpoint.query(db, sql, params)\nexcept QueryEndpointError as e:\n    log.error(\"QueryEndpoint unavailable, falling back to HTTP: %s\", e)\n    batches = query_via_http_api(db, sql)","preventionTips":["Assume QueryEndpoint::query is unimplemented in processing-engine plugins","Use the HTTP query API from plugins needing data access","Check plugin API docs for your server version before relying on endpoint methods"],"tags":["query","not-implemented","plugins","stub"],"backgroundTag":"method-not-implemented","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}