Skip to content

Commit 08bdd5a

Browse files
committed
fix(api-gateway): Fix CompareDateRange queries native transformations
1 parent 9956ad7 commit 08bdd5a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

rust/cubeorchestrator/src/transport.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ pub struct GroupingSet {
8282
pub sub_id: Option<u32>,
8383
}
8484

85+
#[derive(Debug, Clone, Serialize, Deserialize)]
86+
#[serde(untagged)]
87+
pub enum CompareDateRangeType {
88+
Single(Vec<String>),
89+
Multi(Vec<Vec<String>>),
90+
}
91+
8592
// We can do nothing with JS functions here,
8693
// but to keep DTOs in sync with reality, let's keep it.
8794
pub type JsFunction = String;
@@ -120,7 +127,7 @@ pub struct ParsedMemberExpression {
120127
pub struct QueryTimeDimension {
121128
pub dimension: String,
122129
pub date_range: Option<Vec<String>>,
123-
pub compare_date_range: Option<Vec<String>>,
130+
pub compare_date_range: Option<CompareDateRangeType>,
124131
pub granularity: Option<String>,
125132
}
126133

@@ -161,6 +168,8 @@ pub struct ConfigItem {
161168
pub drill_members_grouped: Option<DrillMembersGrouped>,
162169
#[serde(skip_serializing_if = "Option::is_none")]
163170
pub granularities: Option<Vec<GranularityMeta>>,
171+
#[serde(skip_serializing_if = "Option::is_none")]
172+
pub granularity: Option<GranularityMeta>,
164173
}
165174

166175
#[derive(Debug, Clone, Serialize, Deserialize)]

0 commit comments

Comments
 (0)