Skip to content

Commit 5189b86

Browse files
committed
feat(cubesql): Support PatchMeasure in SQL pushdown
1 parent 7ee734d commit 5189b86

File tree

5 files changed

+346
-8
lines changed

5 files changed

+346
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
source: cubesql/src/compile/engine/df/wrapper.rs
3+
expression: "UngroupedMemberDef\n{\n cube_name: \"cube\".to_string(), alias: \"alias\".to_string(), expr:\n UngroupedMemberExpr::PatchMeasure(PatchMeasureDef\n {\n source_measure: \"cube.measure\".to_string(), replace_aggregation_type:\n None, add_filters:\n vec![SqlFunctionExpr\n {\n cube_params: vec![\"cube\".to_string()], sql:\n \"1 + 2 = 3\".to_string(),\n }],\n }), grouping_set: None,\n}"
4+
---
5+
{
6+
"cubeName": "cube",
7+
"alias": "alias",
8+
"expr": {
9+
"type": "PatchMeasure",
10+
"sourceMeasure": "cube.measure",
11+
"replaceAggregationType": null,
12+
"addFilters": [
13+
{
14+
"cubeParams": [
15+
"cube"
16+
],
17+
"sql": "1 + 2 = 3"
18+
}
19+
]
20+
},
21+
"groupingSet": null
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
source: cubesql/src/compile/engine/df/wrapper.rs
3+
expression: "UngroupedMemberDef\n{\n cube_name: \"cube\".to_string(), alias: \"alias\".to_string(), expr:\n UngroupedMemberExpr::SqlFunction(SqlFunctionExpr\n {\n cube_params: vec![\"cube\".to_string(), \"other\".to_string()], sql:\n \"1 + 2\".to_string(),\n }), grouping_set: None,\n}"
4+
---
5+
{
6+
"cubeName": "cube",
7+
"alias": "alias",
8+
"expr": {
9+
"type": "SqlFunction",
10+
"cubeParams": [
11+
"cube",
12+
"other"
13+
],
14+
"sql": "1 + 2"
15+
},
16+
"groupingSet": null
17+
}

0 commit comments

Comments
 (0)