{"record":{"id":"f7ef2367a86df9e4","repo":"cube-js/cube","slug":"inconsistent-daterange-configuration-for-the-compa","errorCode":null,"errorMessage":"Inconsistent dateRange configuration for the compare date range query: {}","messagePattern":"Inconsistent dateRange configuration for the compare date range query: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cube/cubeorchestrator/src/query_result_transform.rs","lineNumber":245,"sourceCode":"    time_dimensions: Option<&Vec<QueryTimeDimension>>,\n) -> Result<DBResponsePrimitive> {\n    let time_dimensions = match time_dimensions {\n        Some(time_dimensions) => time_dimensions,\n        None => bail!(\"QueryTimeDimension should be specified for the compare date range query.\"),\n    };\n\n    let dim = match time_dimensions.first() {\n        Some(dim) => dim,\n        None => bail!(\"No time dimension provided.\"),\n    };\n\n    let date_range: &Vec<String> = match &dim.date_range {\n        Some(date_range) => date_range,\n        None => bail!(\"Inconsistent QueryTimeDimension configuration: dateRange required.\"),\n    };\n\n    if date_range.len() == 1 {\n        bail!(\n            \"Inconsistent dateRange configuration for the compare date range query: {}\",\n            date_range[0]\n        );\n    }\n\n    Ok(DBResponsePrimitive::String(\n        date_range.join(COMPARE_DATE_RANGE_SEPARATOR),\n    ))\n}\n\n/// Parse blending query key from time dimension for query.\npub fn get_blending_query_key(time_dimensions: Option<&Vec<QueryTimeDimension>>) -> Result<String> {\n    let dim = time_dimensions\n        .and_then(|dims| dims.first().cloned())\n        .context(\"QueryTimeDimension should be specified for the blending query.\")?;\n\n    let granularity = dim\n        .granularity.clone()","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cube/cubeorchestrator/src/query_result_transform.rs#L227-L263","documentation":"Raised in get_date_range_value when the compare date range query's time dimension does have a dateRange, but its value is malformed — for example an empty or single-element list instead of the expected [from, to] pair. The query plan cannot interpret the boundaries, so the transform aborts before contacting Cube Store.","triggerScenarios":"Thrown at rust/cube/cubeorchestrator/src/query_result_transform.rs:245 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide dateRange as exactly two entries: the start and end of the range","When using named ranges, make sure the range resolves to a bounded interval (unbounded ranges are not valid for compare queries)","Check client-side query builders that assemble dateRange dynamically for off-by-one or empty array bugs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}