diff --git a/packages/cubejs-api-gateway/openspec.yml b/packages/cubejs-api-gateway/openspec.yml index 4b04c06dbdcd5..5add9ce3a6bcb 100644 --- a/packages/cubejs-api-gateway/openspec.yml +++ b/packages/cubejs-api-gateway/openspec.yml @@ -127,6 +127,8 @@ components: type: "string" title: type: "string" + shortTitle: + type: "string" description: type: "string" type: @@ -150,6 +152,8 @@ components: type: "string" title: type: "string" + shortTitle: + type: "string" description: type: "string" type: diff --git a/rust/cubesql/cubeclient/src/models/v1_cube_meta_dimension.rs b/rust/cubesql/cubeclient/src/models/v1_cube_meta_dimension.rs index 3b4ab102c5ca0..e13cc186c93a1 100644 --- a/rust/cubesql/cubeclient/src/models/v1_cube_meta_dimension.rs +++ b/rust/cubesql/cubeclient/src/models/v1_cube_meta_dimension.rs @@ -14,6 +14,8 @@ pub struct V1CubeMetaDimension { pub name: String, #[serde(rename = "title", skip_serializing_if = "Option::is_none")] pub title: Option, + #[serde(rename = "shortTitle", skip_serializing_if = "Option::is_none")] + pub short_title: Option, #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, #[serde(rename = "type")] @@ -32,6 +34,7 @@ impl V1CubeMetaDimension { V1CubeMetaDimension { name, title: None, + short_title: None, description: None, r#type, alias_member: None, diff --git a/rust/cubesql/cubeclient/src/models/v1_cube_meta_measure.rs b/rust/cubesql/cubeclient/src/models/v1_cube_meta_measure.rs index b05992a289247..9acab8ddc2cae 100644 --- a/rust/cubesql/cubeclient/src/models/v1_cube_meta_measure.rs +++ b/rust/cubesql/cubeclient/src/models/v1_cube_meta_measure.rs @@ -14,6 +14,8 @@ pub struct V1CubeMetaMeasure { pub name: String, #[serde(rename = "title", skip_serializing_if = "Option::is_none")] pub title: Option, + #[serde(rename = "shortTitle", skip_serializing_if = "Option::is_none")] + pub short_title: Option, #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, #[serde(rename = "type")] @@ -29,6 +31,7 @@ impl V1CubeMetaMeasure { V1CubeMetaMeasure { name, title: None, + short_title: None, description: None, r#type, agg_type: None, diff --git a/rust/cubesql/cubesql/benches/large_model.rs b/rust/cubesql/cubesql/benches/large_model.rs index 34e956d0bb1a9..ffbab70781656 100644 --- a/rust/cubesql/cubesql/benches/large_model.rs +++ b/rust/cubesql/cubesql/benches/large_model.rs @@ -77,6 +77,7 @@ pub fn get_large_model_test_meta(dims: usize) -> Vec { V1CubeMetaMeasure { name: format!("{}.count", cube_name), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("count".to_string()), @@ -85,6 +86,7 @@ pub fn get_large_model_test_meta(dims: usize) -> Vec { V1CubeMetaMeasure { name: format!("{}.sum", cube_name), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("sum".to_string()), diff --git a/rust/cubesql/cubesql/src/compile/test/mod.rs b/rust/cubesql/cubesql/src/compile/test/mod.rs index 2f52b9f3992a0..2b863aa24577d 100644 --- a/rust/cubesql/cubesql/src/compile/test/mod.rs +++ b/rust/cubesql/cubesql/src/compile/test/mod.rs @@ -93,6 +93,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "KibanaSampleDataEcommerce.count".to_string(), title: None, + short_title: None, description: Some("Events count".to_string()), r#type: "number".to_string(), agg_type: Some("count".to_string()), @@ -101,6 +102,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "KibanaSampleDataEcommerce.maxPrice".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("max".to_string()), @@ -109,6 +111,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "KibanaSampleDataEcommerce.sumPrice".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("sum".to_string()), @@ -117,6 +120,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "KibanaSampleDataEcommerce.minPrice".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("min".to_string()), @@ -125,6 +129,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "KibanaSampleDataEcommerce.avgPrice".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("avg".to_string()), @@ -133,6 +138,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "KibanaSampleDataEcommerce.countDistinct".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("countDistinct".to_string()), @@ -189,6 +195,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "Logs.agentCount".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("countDistinct".to_string()), @@ -197,6 +204,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "Logs.agentCountApprox".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("countDistinctApprox".to_string()), @@ -221,6 +229,7 @@ pub fn get_test_meta() -> Vec { measures: vec![CubeMetaMeasure { name: "NumberCube.someNumber".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("number".to_string()), @@ -250,6 +259,7 @@ pub fn get_test_meta() -> Vec { r#type: "number".to_string(), agg_type: Some("number".to_string()), title: None, + short_title: None, description: None, meta: None, }) @@ -258,6 +268,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "WideCube.count".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("count".to_string()), @@ -266,6 +277,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "WideCube.maxPrice".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("max".to_string()), @@ -274,6 +286,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "WideCube.minPrice".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("min".to_string()), @@ -282,6 +295,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "WideCube.avgPrice".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("avg".to_string()), @@ -290,6 +304,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "WideCube.countDistinct".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("countDistinct".to_string()), @@ -342,6 +357,7 @@ pub fn get_test_meta() -> Vec { r#type: "number".to_string(), agg_type: Some("number".to_string()), title: None, + short_title: None, description: Some(format!("Test number measure {i}")), meta: None, }, @@ -350,6 +366,7 @@ pub fn get_test_meta() -> Vec { r#type: "string".to_string(), agg_type: Some("max".to_string()), title: None, + short_title: None, description: Some(format!("Test max(string) measure {i}")), meta: None, }, @@ -358,6 +375,7 @@ pub fn get_test_meta() -> Vec { r#type: "time".to_string(), agg_type: Some("max".to_string()), title: None, + short_title: None, description: Some(format!("Test max(time) measure {i}")), meta: None, }, @@ -368,6 +386,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "MultiTypeCube.count".to_string(), title: None, + short_title: None, description: Some("Test count measure".to_string()), r#type: "number".to_string(), agg_type: Some("count".to_string()), @@ -376,6 +395,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "MultiTypeCube.maxPrice".to_string(), title: None, + short_title: None, description: Some("Test maxPrice measure".to_string()), r#type: "number".to_string(), agg_type: Some("max".to_string()), @@ -384,6 +404,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "MultiTypeCube.minPrice".to_string(), title: None, + short_title: None, description: Some("Test minPrice measure".to_string()), r#type: "number".to_string(), agg_type: Some("min".to_string()), @@ -392,6 +413,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "MultiTypeCube.avgPrice".to_string(), title: None, + short_title: None, description: Some("Test avgPrice measure".to_string()), r#type: "number".to_string(), agg_type: Some("avg".to_string()), @@ -400,6 +422,7 @@ pub fn get_test_meta() -> Vec { CubeMetaMeasure { name: "MultiTypeCube.countDistinct".to_string(), title: None, + short_title: None, description: Some("Test countDistinct measure".to_string()), r#type: "number".to_string(), agg_type: Some("countDistinct".to_string()), @@ -428,6 +451,7 @@ pub fn get_string_cube_meta() -> Vec { measures: vec![CubeMetaMeasure { name: "StringCube.someString".to_string(), title: None, + short_title: None, description: None, r#type: "string".to_string(), agg_type: Some("string".to_string()), @@ -452,6 +476,7 @@ pub fn get_sixteen_char_member_cube() -> Vec { CubeMetaMeasure { name: "SixteenChar.sixteen_charchar".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("sum".to_string()), @@ -460,6 +485,7 @@ pub fn get_sixteen_char_member_cube() -> Vec { CubeMetaMeasure { name: "SixteenChar.sixteen_charchar_foo".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("avg".to_string()), @@ -468,6 +494,7 @@ pub fn get_sixteen_char_member_cube() -> Vec { CubeMetaMeasure { name: "SixteenChar.sixteen_charchar_bar".to_string(), title: None, + short_title: None, description: None, r#type: "number".to_string(), agg_type: Some("count".to_string()),