@@ -2567,19 +2567,13 @@ impl MemberRules {
25672567 left_alias_to_cube_var : & ' static str ,
25682568 right_alias_to_cube_var : & ' static str ,
25692569 joined_alias_to_cube_var : & ' static str ,
2570- left_order_var : & ' static str ,
2571- right_order_var : & ' static str ,
2572- new_order_var : & ' static str ,
25732570 left_ungrouped_var : & ' static str ,
25742571 right_ungrouped_var : & ' static str ,
25752572 new_ungrouped_var : & ' static str ,
25762573 ) -> impl Fn ( & mut CubeEGraph , & mut Subst ) -> bool {
25772574 let left_alias_to_cube_var = var ! ( left_alias_to_cube_var) ;
25782575 let right_alias_to_cube_var = var ! ( right_alias_to_cube_var) ;
25792576 let joined_alias_to_cube_var = var ! ( joined_alias_to_cube_var) ;
2580- let left_order_var = var ! ( left_order_var) ;
2581- let right_order_var = var ! ( right_order_var) ;
2582- let new_order_var = var ! ( new_order_var) ;
25832577 let left_ungrouped_var = var ! ( left_ungrouped_var) ;
25842578 let right_ungrouped_var = var ! ( right_ungrouped_var) ;
25852579 let new_ungrouped_var = var ! ( new_ungrouped_var) ;
@@ -2601,16 +2595,6 @@ impl MemberRules {
26012595 for right_alias_to_cube in
26022596 var_iter ! ( egraph[ subst[ right_alias_to_cube_var] ] , CubeScanAliasToCube ) . cloned ( )
26032597 {
2604- let is_left_order_empty =
2605- Some ( true ) == egraph[ subst[ left_order_var] ] . data . is_empty_list ;
2606-
2607- let is_right_order_empty =
2608- Some ( true ) == egraph[ subst[ right_order_var] ] . data . is_empty_list ;
2609-
2610- if !is_left_order_empty && !is_right_order_empty {
2611- continue ;
2612- }
2613-
26142598 subst. insert (
26152599 joined_alias_to_cube_var,
26162600 egraph. add ( LogicalPlanLanguage :: CubeScanAliasToCube (
@@ -2623,14 +2607,6 @@ impl MemberRules {
26232607 ) ) ,
26242608 ) ;
26252609
2626- let orders = if is_left_order_empty {
2627- subst[ right_order_var]
2628- } else {
2629- subst[ left_order_var]
2630- } ;
2631-
2632- subst. insert ( new_order_var, orders) ;
2633-
26342610 let joined_ungrouped = egraph. add ( LogicalPlanLanguage :: CubeScanUngrouped (
26352611 CubeScanUngrouped ( left_ungrouped && right_ungrouped) ,
26362612 ) ) ;
@@ -2708,7 +2684,7 @@ impl MemberRules {
27082684 "?joined_alias_to_cube" ,
27092685 cube_scan_members ( left_members, right_members) ,
27102686 cube_scan_filters ( "?left_filters" , "?right_filters" ) ,
2711- "?new_order" ,
2687+ cube_scan_order_empty_tail ( ) ,
27122688 "CubeScanLimit:None" ,
27132689 "CubeScanOffset:None" ,
27142690 "CubeScanSplit:false" ,
@@ -2720,9 +2696,6 @@ impl MemberRules {
27202696 "?left_alias_to_cube" ,
27212697 "?right_alias_to_cube" ,
27222698 "?joined_alias_to_cube" ,
2723- "?left_order" ,
2724- "?right_order" ,
2725- "?new_order" ,
27262699 "?left_ungrouped" ,
27272700 "?right_ungrouped" ,
27282701 "?new_ungrouped" ,
0 commit comments