{"record":{"id":"898df78941ed8b3f","repo":"prestodb/presto","slug":"prometheus-unknown-error-898df7","errorCode":"PROMETHEUS_UNKNOWN_ERROR","errorMessage":"split URI invalid: ${e.getMessage()}","messagePattern":"split URI invalid: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-prometheus/src/main/java/com/facebook/presto/plugin/prometheus/PrometheusSplitManager.java","lineNumber":202,"sourceCode":"        PrometheusTableHandle tableHandle = layoutHandle.getTableHandle();\n        PrometheusTable table = prometheusClient.getTable(tableHandle.getSchemaName(), tableHandle.getTableName());\n\n        // this can happen if table is removed during a query\n        if (table == null) {\n            throw new TableNotFoundException(tableHandle.toSchemaTableName());\n        }\n        List<ConnectorSplit> splits = generateTimesForSplits(prometheusClock.now(), maxQueryRangeDuration, queryChunkSizeDuration, tableHandle)\n                .stream()\n                .map(time -> {\n                    try {\n                        return new PrometheusSplit(buildQuery(\n                                prometheusURI,\n                                time,\n                                table.getName(),\n                                queryChunkSizeDuration));\n                    }\n                    catch (URISyntaxException e) {\n                        throw new PrestoException(PROMETHEUS_UNKNOWN_ERROR, \"split URI invalid: \" + e.getMessage());\n                    }\n                }).collect(Collectors.toList());\n        return new FixedSplitSource(splits);\n    }\n\n    private static class EffectiveLimits\n    {\n        private final Instant upperBound;\n        private final java.time.Duration maxQueryRangeDuration;\n\n        /**\n         * If no upper bound is specified by the predicate, we use the time now() as the defaultUpperBound\n         * if predicate LOWER bound is set AND predicate UPPER bound is set:\n         * max duration          = upper bound - lower bound\n         * effective upper bound = predicate upper bound\n         * if predicate LOWER bound is NOT set AND predicate UPPER bound is set:\n         * max duration          = config max duration\n         * effective upper bound = predicate upper bound","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-prometheus/src/main/java/com/facebook/presto/plugin/prometheus/PrometheusSplitManager.java#L184-L220","documentation":"Catch in getSplits' split construction: building the split URI from the generated time chunk and table metadata failed (malformed URI, illegal characters), and the error is re-raised with the underlying message embedded. Fires when the composed Prometheus query URL is invalid.","triggerScenarios":"Thrown at presto-prometheus/src/main/java/com/facebook/presto/plugin/prometheus/PrometheusSplitManager.java:202 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the embedded cause message for the bad URI component","Check table/metric names for characters needing URL encoding","Verify prometheus.uri and time parameters are well-formed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}