Skip to content

Commit 658f8d4

Browse files
mcheshkovmarianore-muttdata
authored andcommitted
feat(cubesql): Support trivial casts in member pushdown (cube-js#9480)
This should allow pushing down expressions like `CAST(dimension AS TEXT) AS alias` into `CubeScan` as regular dimensions. And that, in turn, should allow `__cubeJoinField` joins to see more `CubeScan`s Supporting changes: Remove unused rule for member pushdown from `AllMembers` All matching happening with `CubeScanMembers` on top of actual members node, and this rule does not expect that `member_name_to_expr` part of analysis can extract members from `CubeScanMembers(AllMembers)`, so there's no reason to keep this rule Add explicit type in `var!` macro, to avoid type confusion.
1 parent a1c6ebc commit 658f8d4

File tree

5 files changed

+230
-185
lines changed

5 files changed

+230
-185
lines changed

rust/cubesql/cubesql/src/compile/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13429,7 +13429,7 @@ ORDER BY "source"."str0" ASC
1342913429
V1LoadResultAnnotation::new(json!([]), json!([]), json!([]), json!([]))
1343013430
}
1343113431

13432-
fn simple_load_response(data: Vec<serde_json::Value>) -> V1LoadResponse {
13432+
pub(crate) fn simple_load_response(data: Vec<serde_json::Value>) -> V1LoadResponse {
1343313433
V1LoadResponse::new(vec![V1LoadResult::new(empty_annotation(), data)])
1343413434
}
1343513435

rust/cubesql/cubesql/src/compile/rewrite/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ macro_rules! var_list_iter {
560560
#[macro_export]
561561
macro_rules! var {
562562
($var_str:expr) => {
563-
$var_str.parse().unwrap()
563+
$var_str.parse::<::egg::Var>().unwrap()
564564
};
565565
}
566566

0 commit comments

Comments
 (0)